PGROUTING
3.2
|
#include "c_common/edges_input.h"
#include <math.h>
#include <float.h>
#include <limits.h>
#include <stddef.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"
Go to the source code of this file.
Functions | |
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) |
static void | fetch_costFlow_edge (HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info[7], int64_t *default_id, int64_t default_rcapacity, float8 default_rcost, pgr_costFlow_t *edge, size_t *valid_edges, bool normal) |
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) |
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) |
static void | get_edges_5_columns (char *sql, pgr_edge_t **edges, size_t *totalTuples, bool ignore_id, bool normal) |
static void | get_edges_9_columns (char *sql, Pgr_edge_xy_t **edges, size_t *total_edges, bool normal) |
static void | get_edges_basic (char *sql, pgr_basic_edge_t **edges, size_t *totalTuples, bool ignore_id) |
static void | get_edges_costFlow (char *sql, pgr_costFlow_t **edges, size_t *totalTuples, bool ignore_id) |
static void | get_edges_flow (char *sql, pgr_edge_t **edges, size_t *totalTuples, bool ignore_id) |
void | pgr_get_basic_edges (char *sql, pgr_basic_edge_t **edges, size_t *total_edges) |
read basic edges More... | |
void | pgr_get_costFlow_edges (char *sql, pgr_costFlow_t **edges, size_t *total_edges) |
read edges for cost flow More... | |
void | pgr_get_edges (char *edges_sql, pgr_edge_t **edges, size_t *total_edges) |
basic edge_sql More... | |
void | pgr_get_edges_no_id (char *edges_sql, pgr_edge_t **edges, size_t *total_edges) |
edges_sql without id parameter More... | |
void | pgr_get_edges_reversed (char *edges_sql, pgr_edge_t **edges, size_t *total_edges) |
void | pgr_get_edges_xy (char *edges_sql, Pgr_edge_xy_t **edges, size_t *total_edges) |
Edges with x, y vertices values. More... | |
void | pgr_get_edges_xy_reversed (char *edges_sql, Pgr_edge_xy_t **edges, size_t *total_edges) |
for many to 1 on aStar More... | |
void | pgr_get_flow_edges (char *sql, pgr_edge_t **edges, size_t *total_edges) |
read edges for flow More... | |
|
static |
Definition at line 44 of file edges_input.c.
References column_found(), edge::id, pgr_SPI_getBigInt(), pgr_SPI_getFloat8(), edge::source, and edge::target.
Referenced by get_edges_basic().
|
static |
Definition at line 113 of file edges_input.c.
References column_found(), edge::cost, pgr_SPI_getBigInt(), pgr_SPI_getFloat8(), edge::reverse_cost, edge::source, and edge::target.
Referenced by get_edges_costFlow().
|
static |
Definition at line 70 of file edges_input.c.
References column_found(), edge::cost, edge::id, pgr_SPI_getBigInt(), pgr_SPI_getFloat8(), edge::reverse_cost, edge::source, and edge::target.
Referenced by get_edges_5_columns(), and get_edges_flow().
|
static |
Definition at line 157 of file edges_input.c.
References column_found(), edge::cost, edge::id, PGR_DBG, pgr_SPI_getBigInt(), pgr_SPI_getFloat8(), edge::reverse_cost, edge::source, and edge::target.
Referenced by get_edges_9_columns().
|
static |
Definition at line 310 of file edges_input.c.
References ANY_INTEGER, ANY_NUMERICAL, Column_info_t::colNumber, Column_info_t::eType, fetch_edge(), Column_info_t::name, PGR_DBG, pgr_fetch_column_info(), pgr_SPI_cursor_open(), pgr_SPI_prepare(), Column_info_t::strict, time_msg(), and Column_info_t::type.
Referenced by pgr_get_edges(), pgr_get_edges_no_id(), and pgr_get_edges_reversed().
|
static |
Definition at line 205 of file edges_input.c.
References ANY_INTEGER, ANY_NUMERICAL, Column_info_t::colNumber, Column_info_t::eType, fetch_edge_with_xy(), Column_info_t::name, PGR_DBG, pgr_fetch_column_info(), pgr_SPI_cursor_open(), pgr_SPI_prepare(), Column_info_t::strict, time_msg(), and Column_info_t::type.
Referenced by pgr_get_edges_xy(), and pgr_get_edges_xy_reversed().
|
static |
Definition at line 596 of file edges_input.c.
References ANY_INTEGER, ANY_NUMERICAL, Column_info_t::colNumber, Column_info_t::eType, fetch_basic_edge(), Column_info_t::name, PGR_DBG, pgr_fetch_column_info(), pgr_SPI_cursor_open(), pgr_SPI_prepare(), Column_info_t::strict, time_msg(), and Column_info_t::type.
Referenced by pgr_get_basic_edges().
|
static |
Definition at line 498 of file edges_input.c.
References ANY_INTEGER, ANY_NUMERICAL, Column_info_t::colNumber, Column_info_t::eType, fetch_costFlow_edge(), Column_info_t::name, PGR_DBG, pgr_fetch_column_info(), pgr_SPI_cursor_open(), pgr_SPI_prepare(), Column_info_t::strict, time_msg(), and Column_info_t::type.
Referenced by pgr_get_costFlow_edges().
|
static |
Definition at line 406 of file edges_input.c.
References ANY_INTEGER, Column_info_t::colNumber, Column_info_t::eType, fetch_edge(), Column_info_t::name, PGR_DBG, pgr_fetch_column_info(), pgr_SPI_cursor_open(), pgr_SPI_prepare(), Column_info_t::strict, time_msg(), and Column_info_t::type.
Referenced by pgr_get_flow_edges().
void pgr_get_basic_edges | ( | char * | sql, |
pgr_basic_edge_t ** | edges, | ||
size_t * | total_edges | ||
) |
read basic edges
For queries of the type:
[in] | sql | |
[out] | edges | |
[out] | total_edges |
Definition at line 766 of file edges_input.c.
References get_edges_basic().
Referenced by process().
void pgr_get_costFlow_edges | ( | char * | sql, |
pgr_costFlow_t ** | edges, | ||
size_t * | total_edges | ||
) |
read edges for cost flow
Edges:
bigint id, bigint source, bigint target, bigint capacity, bigint reverse_capacity float cost, float reverse_cost
[in] | sql | |
[out] | edges | |
[out] | total_edges |
Definition at line 701 of file edges_input.c.
References get_edges_costFlow().
Referenced by process().
void pgr_get_edges | ( | char * | edges_sql, |
pgr_edge_t ** | edges, | ||
size_t * | total_edges | ||
) |
basic edge_sql
For queries of the type:
[in] | edges_sql | |
[out] | edges | |
[out] | total_edges |
Definition at line 711 of file edges_input.c.
References get_edges_5_columns().
Referenced by compute(), compute_trsp(), process(), and process_combinations().
void pgr_get_edges_no_id | ( | char * | edges_sql, |
pgr_edge_t ** | edges, | ||
size_t * | total_edges | ||
) |
edges_sql without id parameter
Currently used in: allpairs
[in] | edges_sql | |
[out] | edges | |
[out] | total_edges |
Definition at line 733 of file edges_input.c.
References get_edges_5_columns().
Referenced by process().
void pgr_get_edges_reversed | ( | char * | edges_sql, |
pgr_edge_t ** | edges, | ||
size_t * | total_edges | ||
) |
Definition at line 722 of file edges_input.c.
References get_edges_5_columns().
Referenced by process().
void pgr_get_edges_xy | ( | char * | edges_sql, |
Pgr_edge_xy_t ** | edges, | ||
size_t * | total_edges | ||
) |
Edges with x, y vertices values.
For queries of the type:
[in] | edges_sql | |
[out] | edges | |
[out] | total_edges |
Definition at line 744 of file edges_input.c.
References get_edges_9_columns().
Referenced by process().
void pgr_get_edges_xy_reversed | ( | char * | edges_sql, |
Pgr_edge_xy_t ** | edges, | ||
size_t * | total_edges | ||
) |
for many to 1 on aStar
Used internally
Transforms queries of the type:
to
[in] | edges_sql | |
[out] | edges | |
[out] | total_edges |
Definition at line 757 of file edges_input.c.
References get_edges_9_columns().
Referenced by process().
void pgr_get_flow_edges | ( | char * | sql, |
pgr_edge_t ** | edges, | ||
size_t * | total_edges | ||
) |
read edges for flow
Edges:
bigint id, bigint source, bigint target, bigint capacity, bigint reverse_capacity
[in] | sql | |
[out] | edges | |
[out] | total_edges |
Definition at line 691 of file edges_input.c.
References get_edges_flow().
Referenced by process().