GPUdb C++ API
Version 7.2.2.4
|
A set of parameters for GPUdb::solveGraph. More...
#include <gpudb/protocol/solve_graph.h>
Public Member Functions | |
SolveGraphRequest () | |
Constructs a SolveGraphRequest object with default parameters. More... | |
SolveGraphRequest (const std::string &graphName_, const std::vector< std::string > &weightsOnEdges_, const std::vector< std::string > &restrictions_, const std::string &solverType_, const std::vector< std::string > &sourceNodes_, const std::vector< std::string > &destinationNodes_, const std::string &solutionTable_, const std::map< std::string, std::string > &options_) | |
Constructs a SolveGraphRequest object with the specified parameters. More... | |
Public Attributes | |
std::string | graphName |
Name of the graph resource to solve. More... | |
std::vector< std::string > | weightsOnEdges |
Additional weights to apply to the edges of an existing graph. More... | |
std::vector< std::string > | restrictions |
Additional restrictions to apply to the nodes/edges of an existing graph. More... | |
std::string | solverType |
The type of solver to use for the graph. More... | |
std::vector< std::string > | sourceNodes |
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes. More... | |
std::vector< std::string > | destinationNodes |
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes. More... | |
std::string | solutionTable |
Name of the table to store the solution, in [ schema_name. More... | |
std::map< std::string, std::string > | options |
Additional parameters. More... | |
A set of parameters for GPUdb::solveGraph.
Solves an existing graph for a type of problem (e.g., shortest path, page rank, travelling salesman, etc.) using source nodes, destination nodes, and additional, optional weights and restrictions.
IMPORTANT: It's highly recommended that you review the Graphs & Solvers concepts documentation, the Graph REST Tutorial, and/or some /solve/graph examples before using this endpoint.
Definition at line 26 of file solve_graph.h.
|
inline |
Constructs a SolveGraphRequest object with default parameters.
Definition at line 31 of file solve_graph.h.
|
inline |
Constructs a SolveGraphRequest object with the specified parameters.
[in] | graphName_ | Name of the graph resource to solve. |
[in] | weightsOnEdges_ | Additional weights to apply to the edges of an existing graph. Weights must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS_EDGE_ID', expressions, e.g., 'ST_LENGTH(wkt) AS WEIGHTS_VALUESPECIFIED', or constant values, e.g., '{4, 15, 2} AS WEIGHTS_VALUESPECIFIED'. Any provided weights will be added (in the case of 'WEIGHTS_VALUESPECIFIED') to or multiplied with (in the case of 'WEIGHTS_FACTORSPECIFIED') the existing weight(s). If using constant values in an identifier combination, the number of values specified must match across the combination. The default value is an empty vector. |
[in] | restrictions_ | Additional restrictions to apply to the nodes/edges of an existing graph. Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS_EDGE_ID', expressions, e.g., 'column/2 AS RESTRICTIONS_VALUECOMPARED', or constant values, e.g., '{0, 0, 0, 1} AS RESTRICTIONS_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination. If remove_previous_restrictions option is set to true, any provided restrictions will replace the existing restrictions. Otherwise, any provided restrictions will be added (in the case of 'RESTRICTIONS_VALUECOMPARED') to or replaced (in the case of 'RESTRICTIONS_ONOFFCOMPARED'). The default value is an empty vector. |
[in] | solverType_ | The type of solver to use for the graph. Supported values:
|
[in] | sourceNodes_ | It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes. For BACKHAUL_ROUTING, this list depicts the fixed assets. The default value is an empty vector. |
[in] | destinationNodes_ | It can be one of the nodal identifiers
|
[in] | solutionTable_ | Name of the table to store the solution, in [schema_name.]table_name format, using standard name resolution rules. The default value is 'graph_solutions'. |
[in] | options_ | Additional parameters.
|
Definition at line 438 of file solve_graph.h.
std::vector<std::string> gpudb::SolveGraphRequest::destinationNodes |
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for destination (target) nodes.
For BACKHAUL_ROUTING, this list depicts the remote assets. The default value is an empty vector.
Definition at line 564 of file solve_graph.h.
std::string gpudb::SolveGraphRequest::graphName |
Name of the graph resource to solve.
Definition at line 453 of file solve_graph.h.
std::map<std::string, std::string> gpudb::SolveGraphRequest::options |
Additional parameters.
The default value is an empty map.
Definition at line 746 of file solve_graph.h.
std::vector<std::string> gpudb::SolveGraphRequest::restrictions |
Additional restrictions to apply to the nodes/edges of an existing graph.
Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS_EDGE_ID', expressions, e.g., 'column/2 AS RESTRICTIONS_VALUECOMPARED', or constant values, e.g., '{0, 0, 0, 1} AS RESTRICTIONS_ONOFFCOMPARED'. If using constant values in an identifier combination, the number of values specified must match across the combination. If remove_previous_restrictions option is set to true, any provided restrictions will replace the existing restrictions. Otherwise, any provided restrictions will be added (in the case of 'RESTRICTIONS_VALUECOMPARED') to or replaced (in the case of 'RESTRICTIONS_ONOFFCOMPARED'). The default value is an empty vector.
Definition at line 492 of file solve_graph.h.
std::string gpudb::SolveGraphRequest::solutionTable |
Name of the table to store the solution, in [ schema_name.
\ ]table_name format, using standard name resolution rules. The default value is 'graph_solutions'.
Definition at line 573 of file solve_graph.h.
std::string gpudb::SolveGraphRequest::solverType |
The type of solver to use for the graph.
Supported values:
The default value is solve_graph_SHORTEST_PATH.
Definition at line 548 of file solve_graph.h.
std::vector<std::string> gpudb::SolveGraphRequest::sourceNodes |
It can be one of the nodal identifiers - e.g: 'NODE_WKTPOINT' for source nodes.
For BACKHAUL_ROUTING, this list depicts the fixed assets. The default value is an empty vector.
Definition at line 556 of file solve_graph.h.
std::vector<std::string> gpudb::SolveGraphRequest::weightsOnEdges |
Additional weights to apply to the edges of an existing graph.
Weights must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS WEIGHTS_EDGE_ID', expressions, e.g., 'ST_LENGTH(wkt) AS WEIGHTS_VALUESPECIFIED', or constant values, e.g., '{4, 15, 2} AS WEIGHTS_VALUESPECIFIED'. Any provided weights will be added (in the case of 'WEIGHTS_VALUESPECIFIED') to or multiplied with (in the case of 'WEIGHTS_FACTORSPECIFIED') the existing weight(s). If using constant values in an identifier combination, the number of values specified must match across the combination. The default value is an empty vector.
Definition at line 472 of file solve_graph.h.