PGROUTING  3.2
pgrouting::functions::Pgr_boyerMyrvold< G > Class Template Reference

#include "pgr_boyerMyrvold.hpp"

Inheritance diagram for pgrouting::functions::Pgr_boyerMyrvold< G >:
Collaboration diagram for pgrouting::functions::Pgr_boyerMyrvold< G >:

Public Types

typedef G::E E
 
typedef G::E_i E_i
 
typedef G::V V
 

Public Member Functions

std::vector< pgr_boyer_tboyerMyrvold (G &graph)
 
void clear ()
 clear More...
 
std::string get_error () const
 get_error More...
 
std::string get_log () const
 get_log More...
 
std::string get_notice () const
 get_notice More...
 
bool has_error () const
 get_error More...
 
bool isPlanar (G &graph)
 

Public Attributes

std::ostringstream error
 Stores the error information. More...
 
std::ostringstream log
 Stores the hint information. More...
 
std::ostringstream notice
 Stores the notice information. More...
 

Private Member Functions

std::vector< pgr_boyer_tgenerateboyerMyrvold (const G &graph)
 

Detailed Description

template<class G>
class pgrouting::functions::Pgr_boyerMyrvold< G >

Definition at line 47 of file pgr_boyerMyrvold.hpp.

Member Typedef Documentation

◆ E

template<class G >
typedef G::E pgrouting::functions::Pgr_boyerMyrvold< G >::E

Definition at line 50 of file pgr_boyerMyrvold.hpp.

◆ E_i

template<class G >
typedef G::E_i pgrouting::functions::Pgr_boyerMyrvold< G >::E_i

Definition at line 51 of file pgr_boyerMyrvold.hpp.

◆ V

template<class G >
typedef G::V pgrouting::functions::Pgr_boyerMyrvold< G >::V

Definition at line 49 of file pgr_boyerMyrvold.hpp.

Member Function Documentation

◆ boyerMyrvold()

template<class G >
std::vector<pgr_boyer_t> pgrouting::functions::Pgr_boyerMyrvold< G >::boyerMyrvold ( G &  graph)
inline

Definition at line 52 of file pgr_boyerMyrvold.hpp.

52  {
53  return generateboyerMyrvold(graph);
54  }

References pgrouting::functions::Pgr_boyerMyrvold< G >::generateboyerMyrvold().

Referenced by do_pgr_boyerMyrvold().

◆ clear()

void pgrouting::Pgr_messages::clear ( )
inherited

clear

Clears All the messages

Definition at line 59 of file pgr_messages.cpp.

59  {
60  log.str("");
61  log.clear();
62 
63  notice.str("");
64  notice.clear();
65 
66  error.str("");
67  error.clear();
68 }

References pgrouting::Pgr_messages::error, pgrouting::Pgr_messages::log, and pgrouting::Pgr_messages::notice.

Referenced by do_pgr_pickDeliver().

◆ generateboyerMyrvold()

template<class G >
std::vector< pgr_boyer_t > pgrouting::functions::Pgr_boyerMyrvold< G >::generateboyerMyrvold ( const G &  graph)
inlineprivate

Definition at line 74 of file pgr_boyerMyrvold.hpp.

74  {
75  std::vector< pgr_boyer_t > results;
76  auto check = boost::boyer_myrvold_planarity_test(graph.graph);
77  if (check) {
78  E_i ei, ei_end;
79  for (boost::tie(ei, ei_end) = edges(graph.graph); ei != ei_end; ++ei) {
80  int64_t src = graph[graph.source(*ei)].id;
81  int64_t tgt = graph[graph.target(*ei)].id;
82  double cost = graph[*ei].cost;
83  pgr_boyer_t tmp;
84  tmp.source = src;
85  tmp.target = tgt;
86  tmp.cost = cost;
87  results.push_back(tmp);
88  }
89  }
90  return results;
91  }

References pgr_boyer_t::cost, pgr_boyer_t::source, and pgr_boyer_t::target.

Referenced by pgrouting::functions::Pgr_boyerMyrvold< G >::boyerMyrvold().

◆ get_error()

std::string pgrouting::Pgr_messages::get_error ( ) const
inherited

get_error

Returns
the current contents of the log and clears the log

Definition at line 53 of file pgr_messages.cpp.

53  {
54  auto str = error.str();
55  return str;
56 }

References pgrouting::Pgr_messages::error.

Referenced by do_pgr_many_withPointsDD(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_withPoints(), do_pgr_withPointsKsp(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().

◆ get_log()

std::string pgrouting::Pgr_messages::get_log ( ) const
inherited

◆ get_notice()

std::string pgrouting::Pgr_messages::get_notice ( ) const
inherited

get_notice

Returns
the current contents of the log and clears the log

Definition at line 42 of file pgr_messages.cpp.

42  {
43  auto str = notice.str();
44  return str;
45 }

References pgrouting::Pgr_messages::notice.

◆ has_error()

bool pgrouting::Pgr_messages::has_error ( ) const
inherited

get_error

Returns
the current contents of the log and clears the log

Definition at line 48 of file pgr_messages.cpp.

48  {
49  return !error.str().empty();
50 }

References pgrouting::Pgr_messages::error.

Referenced by do_pgr_many_withPointsDD(), do_pgr_withPoints(), and do_pgr_withPointsKsp().

◆ isPlanar()

template<class G >
bool pgrouting::functions::Pgr_boyerMyrvold< G >::isPlanar ( G &  graph)
inline

Definition at line 56 of file pgr_boyerMyrvold.hpp.

56  {
57  /* abort in case of an interruption occurs (e.g. the query is being cancelled) */
58  CHECK_FOR_INTERRUPTS();
59  try {
60  return (boost::boyer_myrvold_planarity_test(graph.graph));
61  } catch (boost::exception const& ex) {
62  (void)ex;
63  throw;
64  } catch (std::exception &e) {
65  (void)e;
66  throw;
67  } catch (...) {
68  throw;
69  }
70  return false;
71  }

Referenced by do_pgr_isPlanar().

Member Data Documentation

◆ error

◆ log

◆ notice

std::ostringstream pgrouting::Pgr_messages::notice
mutableinherited

Stores the notice information.

Definition at line 83 of file pgr_messages.h.

Referenced by pgrouting::Pgr_messages::clear(), and pgrouting::Pgr_messages::get_notice().


The documentation for this class was generated from the following file:
pgrouting::Pgr_messages::error
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:85
pgrouting::Pgr_messages::log
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:81
pgrouting::functions::Pgr_boyerMyrvold::E_i
G::E_i E_i
Definition: pgr_boyerMyrvold.hpp:51
pgr_boyer_t
Definition: pgr_boyer_t.h:37
pgrouting::functions::Pgr_boyerMyrvold::generateboyerMyrvold
std::vector< pgr_boyer_t > generateboyerMyrvold(const G &graph)
Definition: pgr_boyerMyrvold.hpp:74
pgrouting::Pgr_messages::notice
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:83
pgr_boyer_t::cost
double cost
Definition: pgr_boyer_t.h:40
pgr_boyer_t::target
int64_t target
Definition: pgr_boyer_t.h:39
pgr_boyer_t::source
int64_t source
Definition: pgr_boyer_t.h:38