GPUdb C++ API  Version 7.2.3.0
match_graph.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __MATCH_GRAPH_H__
7 #define __MATCH_GRAPH_H__
8 
9 namespace gpudb
10 {
27  {
32  graphName(std::string()),
33  samplePoints(std::vector<std::string>()),
34  solveMethod(std::string()),
35  solutionTable(std::string()),
36  options(std::map<std::string, std::string>())
37  {
38  }
39 
900  MatchGraphRequest(const std::string& graphName_, const std::vector<std::string>& samplePoints_, const std::string& solveMethod_, const std::string& solutionTable_, const std::map<std::string, std::string>& options_):
901  graphName( graphName_ ),
902  samplePoints( samplePoints_ ),
903  solveMethod( solveMethod_ ),
904  solutionTable( solutionTable_ ),
905  options( options_ )
906  {
907  }
908 
913  std::string graphName;
914 
927  std::vector<std::string> samplePoints;
928 
992  std::string solveMethod;
993 
1009  std::string solutionTable;
1010 
1487  std::map<std::string, std::string> options;
1488  };
1489 } // end namespace gpudb
1490 
1491 namespace avro
1492 {
1493  template<> struct codec_traits<gpudb::MatchGraphRequest>
1494  {
1495  static void encode(Encoder& e, const gpudb::MatchGraphRequest& v)
1496  {
1497  ::avro::encode(e, v.graphName);
1498  ::avro::encode(e, v.samplePoints);
1499  ::avro::encode(e, v.solveMethod);
1500  ::avro::encode(e, v.solutionTable);
1501  ::avro::encode(e, v.options);
1502  }
1503 
1504  static void decode(Decoder& d, gpudb::MatchGraphRequest& v)
1505  {
1506  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1507  {
1508  const std::vector<size_t> fo = rd->fieldOrder();
1509 
1510  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1511  {
1512  switch (*it)
1513  {
1514  case 0:
1515  ::avro::decode(d, v.graphName);
1516  break;
1517 
1518  case 1:
1519  ::avro::decode(d, v.samplePoints);
1520  break;
1521 
1522  case 2:
1523  ::avro::decode(d, v.solveMethod);
1524  break;
1525 
1526  case 3:
1527  ::avro::decode(d, v.solutionTable);
1528  break;
1529 
1530  case 4:
1531  ::avro::decode(d, v.options);
1532  break;
1533 
1534  default:
1535  break;
1536  }
1537  }
1538  }
1539  else
1540  {
1541  ::avro::decode(d, v.graphName);
1542  ::avro::decode(d, v.samplePoints);
1543  ::avro::decode(d, v.solveMethod);
1544  ::avro::decode(d, v.solutionTable);
1545  ::avro::decode(d, v.options);
1546  }
1547  }
1548  };
1549 } // end namespace avro
1550 
1551 namespace gpudb
1552 {
1558  {
1563  result(bool()),
1564  matchScore(float()),
1565  info(std::map<std::string, std::string>())
1566  {
1567  }
1568 
1572  bool result;
1573 
1578  float matchScore;
1579 
1583  std::map<std::string, std::string> info;
1584  };
1585 } // end namespace gpudb
1586 
1587 namespace avro
1588 {
1589  template<> struct codec_traits<gpudb::MatchGraphResponse>
1590  {
1591  static void encode(Encoder& e, const gpudb::MatchGraphResponse& v)
1592  {
1593  ::avro::encode(e, v.result);
1594  ::avro::encode(e, v.matchScore);
1595  ::avro::encode(e, v.info);
1596  }
1597 
1598  static void decode(Decoder& d, gpudb::MatchGraphResponse& v)
1599  {
1600  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1601  {
1602  const std::vector<size_t> fo = rd->fieldOrder();
1603 
1604  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1605  {
1606  switch (*it)
1607  {
1608  case 0:
1609  ::avro::decode(d, v.result);
1610  break;
1611 
1612  case 1:
1613  ::avro::decode(d, v.matchScore);
1614  break;
1615 
1616  case 2:
1617  ::avro::decode(d, v.info);
1618  break;
1619 
1620  default:
1621  break;
1622  }
1623  }
1624  }
1625  else
1626  {
1627  ::avro::decode(d, v.result);
1628  ::avro::decode(d, v.matchScore);
1629  ::avro::decode(d, v.info);
1630  }
1631  }
1632  };
1633 } // end namespace avro
1634 
1635 #endif // __MATCH_GRAPH_H__
std::string graphName
Name of the underlying geospatial graph resource to match to using samplePoints.
Definition: match_graph.h:913
float matchScore
The mean square error calculation representing the map matching score.
Definition: match_graph.h:1578
std::string solutionTable
The name of the table used to store the results, in [ schema_name.
Definition: match_graph.h:1009
MatchGraphResponse()
Constructs a MatchGraphResponse object with default parameters.
Definition: match_graph.h:1562
A set of parameters for GPUdb::matchGraph.
Definition: match_graph.h:26
std::map< std::string, std::string > options
Additional parameters.
Definition: match_graph.h:1487
std::string solveMethod
The type of solver to use for graph matching.
Definition: match_graph.h:992
MatchGraphRequest(const std::string &graphName_, const std::vector< std::string > &samplePoints_, const std::string &solveMethod_, const std::string &solutionTable_, const std::map< std::string, std::string > &options_)
Constructs a MatchGraphRequest object with the specified parameters.
Definition: match_graph.h:900
std::map< std::string, std::string > info
Additional information.
Definition: match_graph.h:1583
MatchGraphRequest()
Constructs a MatchGraphRequest object with default parameters.
Definition: match_graph.h:31
bool result
Indicates a successful solution.
Definition: match_graph.h:1572
std::vector< std::string > samplePoints
Sample points used to match to an underlying geospatial graph.
Definition: match_graph.h:927
A set of results returned by GPUdb::matchGraph.
Definition: match_graph.h:1557