Skip to content

Commit

Permalink
Using namespace dev (#2505)
Browse files Browse the repository at this point in the history
* [C++] adding missing namespace pgrouting
* [doc] included strings to files & space adjustment on version result
* [allpairs] Adding: use namespace directive
* [alpha_shape] Adding: use namespace directive
* [astar] Adding: use namespace directive
* [bdAstar] Adding: use namespace directive
* [bdDijkstra] Adding: use namespace directive
* [bellman_ford] Adding: use namespace directive
* [breadthFirstSearch] Adding: use namespace directive
* [chinese] Adding: use namespace directive
* [circuits] Adding: use namespace directive
* [coloring] Adding: use namespace directive
* [components] Adding: use namespace directive
* [contraction] Adding: use namespace directive
* [cpp_common] Adding: use namespace directive
* [dagShortestPath] Adding: use namespace directive
* [dijkstra] Adding: use namespace directive
* [dominator] Adding: use namespace directive
* [driving_distance] Adding: use namespace directive
* [ksp] Adding: use namespace directive
* [lineGraph] Adding: use namespace directive
* [max_flow] Adding: use namespace directive
* [mincut] Adding: use namespace directive
* [ordering] Adding: use namespace directive
* [pickDeliver] Adding: use namespace directive
* [planar] Adding: use namespace directive
* [spanningTree] Adding: use namespace directive
* [topologicalSort] Adding: use namespace directive
* [transitiveClosure] Adding: use namespace directive
* [traversal] Adding: use namespace directive
* [trsp] Adding: use namespace directive
* [tsp] Adding: use namespace directive
* [withPoints] Adding: use namespace directive
* [clang] fix clang warnings
* Update locale: commit 370afe5df
* [locale] cleaning comments

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
cvvergara and github-actions[bot] authored Apr 10, 2023
1 parent 66205d8 commit 8faf4f7
Show file tree
Hide file tree
Showing 82 changed files with 438 additions and 4,823 deletions.
14 changes: 11 additions & 3 deletions doc/tsp/pgr_TSP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,17 @@ Inner Queries
Matrix SQL
...............................................................................

.. include:: ../../src/common/matrixRows_input.c
:start-after: Matrix SQL definition start
:end-before: Matrix SQL definition end
.. Matrix SQL definition start
============= ================= =================================================
Column Type Description
============= ================= =================================================
``start_vid`` ``ANY-INTEGER`` Identifier of the starting vertex.
``end_vid`` ``ANY-INTEGER`` Identifier of the ending vertex.
``agg_cost`` ``ANY-NUMERICAL`` Cost for going from start_vid to end_vid
============= ================= =================================================

.. Matrix SQL definition end
Result Columns
-------------------------------------------------------------------------------
Expand Down
15 changes: 12 additions & 3 deletions doc/tsp/pgr_TSPeuclidean.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,18 @@ Inner Queries
Coordinates SQL
...............................................................................

.. include:: ../../src/common/coordinates_input.c
:start-after: Coordinates SQL definition start
:end-before: Coordinates SQL definition end
.. Coordinates SQL definition start
========= ================= =================================================
Column Type Description
========= ================= =================================================
``id`` ``ANY-INTEGER`` Identifier of the starting vertex.
``x`` ``ANY-NUMERICAL`` X value of the coordinate.
``y`` ``ANY-NUMERICAL`` Y value of the coordinate.
========= ================= =================================================

.. Coordinates SQL definition end
Result Columns
-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docqueries/version/doc-full_version.result
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ SET client_min_messages TO NOTICE;
SET
/* -- q1 */
SELECT version, library FROM pgr_full_version();
version | library
version | library
-----------+-----------------
3.6.0-dev | pgrouting-3.6.0
3.6.0-dev | pgrouting-3.6.0
(1 row)

/* -- q2 */
Expand Down
2 changes: 2 additions & 0 deletions include/allpairs/pgr_allpairs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// TODO(vicky) don't keep it here
#include "cpp_common/pgr_alloc.hpp"

namespace pgrouting {
template < class G > class Pgr_allpairs;

// user's functions
Expand Down Expand Up @@ -257,5 +258,6 @@ class Pgr_allpairs {
};
};

} // namespace pgrouting

#endif // INCLUDE_ALLPAIRS_PGR_ALLPAIRS_HPP_
3 changes: 3 additions & 0 deletions include/bellman_ford/pgr_bellman_ford.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


//******************************************
namespace pgrouting {

template < class G >
class Pgr_bellman_ford : public pgrouting::Pgr_messages {
Expand Down Expand Up @@ -312,4 +313,6 @@ class Pgr_bellman_ford : public pgrouting::Pgr_messages {
//@}
};

} // namespace pgrouting

#endif // INCLUDE_BELLMAN_FORD_PGR_BELLMAN_FORD_HPP_
3 changes: 2 additions & 1 deletion include/cpp_common/basePath_SSEC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include "cpp_common/pgr_base_graph.hpp"
#include "cpp_common/rule.h"

namespace pgrouting {

class Path {
typedef std::deque< Path_t >::iterator pthIt;
Expand All @@ -59,7 +60,6 @@ class Path {
Path(int64_t s_id, int64_t e_id)
: m_start_id(s_id), m_end_id(e_id), m_tot_cost(0)
{}
Path(const Path&) = default;

int64_t start_id() const {return m_start_id;}
void start_id(int64_t value) {m_start_id = value;}
Expand Down Expand Up @@ -333,5 +333,6 @@ class Path {
}
};

} // namespace pgrouting

#endif // INCLUDE_CPP_COMMON_BASEPATH_SSEC_HPP_
1 change: 0 additions & 1 deletion include/cpp_common/identifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ namespace pgrouting {
class Identifier {
public:
Identifier() = default;
Identifier(const Identifier &v) = default;
Identifier(const size_t _idx, const int64_t _id);

int64_t id() const;
Expand Down
4 changes: 3 additions & 1 deletion include/cpp_common/identifiers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
/* TODO(vicky)
* compiler check that type T is a integral type
*/
namespace pgrouting {

template <typename T>
class Identifiers {
Expand All @@ -55,7 +56,6 @@ class Identifiers {
//! @name constructors
//@{
Identifiers<T>() = default;
Identifiers<T>(const Identifiers<T>&) = default;
Identifiers<T>(const std::set<T>& data) {
m_ids = data;
}
Expand Down Expand Up @@ -250,4 +250,6 @@ class Identifiers {
}
};

} // namespace pgrouting

#endif // INCLUDE_CPP_COMMON_IDENTIFIERS_HPP_
4 changes: 4 additions & 0 deletions include/cpp_common/pgr_alloc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ SPI_pfree(void *pointer);
}


namespace pgrouting {

/*! \fn pgr_alloc(std::size_t size, T *ptr)
\brief allocates memory
Expand Down Expand Up @@ -84,4 +86,6 @@ pgr_free(T* ptr) {
char *
pgr_msg(const std::string &msg);

} // namespace pgrouting

#endif // INCLUDE_CPP_COMMON_PGR_ALLOC_HPP_
1 change: 0 additions & 1 deletion include/cpp_common/xy_vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ namespace pgrouting {
class XY_vertex {
public:
XY_vertex() = default;
XY_vertex(const XY_vertex &) = default;
XY_vertex(const int64_t _id, double _x, double _y) :
id(_id), point(_x, _y) {
}
Expand Down
4 changes: 4 additions & 0 deletions include/dagShortestPath/pgr_dagShortestPath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include "c_types/ii_t_rt.h"

namespace pgrouting {

template < class G >
class Pgr_dag {
public:
Expand Down Expand Up @@ -360,4 +362,6 @@ class Pgr_dag {
};
};

} // namespace pgrouting

#endif // INCLUDE_DAGSHORTESTPATH_PGR_DAGSHORTESTPATH_HPP_
2 changes: 0 additions & 2 deletions include/vrp/order.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class Order : public Identifier {
Order(size_t p_id, int64_t p_idx,
const Vehicle_node &p_pickup,
const Vehicle_node &p_deliver);

Order(const Order &) = default;
/*!@}*/


Expand Down
1 change: 0 additions & 1 deletion include/vrp/pd_orders.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class PD_Orders {
* @{
*/
PD_Orders() = default;
PD_Orders(const PD_Orders&) = default;
explicit PD_Orders(const std::vector<Orders_t>&);
/*!@}*/

Expand Down
1 change: 0 additions & 1 deletion include/vrp/tw_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ class Tw_node : public Dnode {


Tw_node() = default;
Tw_node(const Tw_node &) = default;
Tw_node(
size_t id,
Orders_t data,
Expand Down
1 change: 0 additions & 1 deletion include/vrp/vehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class Vehicle : public Identifier {
std::vector<Schedule_rt>
get_postgres_result(int vid) const;

Vehicle(const Vehicle &) = default;
Vehicle(
size_t idx,
int64_t id,
Expand Down
1 change: 0 additions & 1 deletion include/vrp/vehicle_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ class Vehicle_node: public Tw_node {

/*! \brief Construct from parameters */
Vehicle_node() = delete;
Vehicle_node(const Vehicle_node &) = default;
explicit Vehicle_node(const Tw_node &node);

private:
Expand Down
3 changes: 0 additions & 3 deletions include/vrp/vehicle_pickDeliver.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ class Vehicle_pickDeliver : public Vehicle {
double p_speed,
double factor);

Vehicle_pickDeliver(const Vehicle_pickDeliver &) = default;


void set_compatibles(const PD_Orders &orders);
bool is_order_feasable(const Order &order) const;
Identifiers<size_t> feasable_orders() const {return m_feasable_orders;}
Expand Down
Loading

0 comments on commit 8faf4f7

Please sign in to comment.