GPUdb C++ API  Version 7.2.2.4
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 
882  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_):
883  graphName( graphName_ ),
884  samplePoints( samplePoints_ ),
885  solveMethod( solveMethod_ ),
886  solutionTable( solutionTable_ ),
887  options( options_ )
888  {
889  }
890 
895  std::string graphName;
896 
909  std::vector<std::string> samplePoints;
910 
974  std::string solveMethod;
975 
991  std::string solutionTable;
992 
1457  std::map<std::string, std::string> options;
1458  };
1459 } // end namespace gpudb
1460 
1461 namespace avro
1462 {
1463  template<> struct codec_traits<gpudb::MatchGraphRequest>
1464  {
1465  static void encode(Encoder& e, const gpudb::MatchGraphRequest& v)
1466  {
1467  ::avro::encode(e, v.graphName);
1468  ::avro::encode(e, v.samplePoints);
1469  ::avro::encode(e, v.solveMethod);
1470  ::avro::encode(e, v.solutionTable);
1471  ::avro::encode(e, v.options);
1472  }
1473 
1474  static void decode(Decoder& d, gpudb::MatchGraphRequest& v)
1475  {
1476  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1477  {
1478  const std::vector<size_t> fo = rd->fieldOrder();
1479 
1480  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1481  {
1482  switch (*it)
1483  {
1484  case 0:
1485  ::avro::decode(d, v.graphName);
1486  break;
1487 
1488  case 1:
1489  ::avro::decode(d, v.samplePoints);
1490  break;
1491 
1492  case 2:
1493  ::avro::decode(d, v.solveMethod);
1494  break;
1495 
1496  case 3:
1497  ::avro::decode(d, v.solutionTable);
1498  break;
1499 
1500  case 4:
1501  ::avro::decode(d, v.options);
1502  break;
1503 
1504  default:
1505  break;
1506  }
1507  }
1508  }
1509  else
1510  {
1511  ::avro::decode(d, v.graphName);
1512  ::avro::decode(d, v.samplePoints);
1513  ::avro::decode(d, v.solveMethod);
1514  ::avro::decode(d, v.solutionTable);
1515  ::avro::decode(d, v.options);
1516  }
1517  }
1518  };
1519 } // end namespace avro
1520 
1521 namespace gpudb
1522 {
1528  {
1533  result(bool()),
1534  matchScore(float()),
1535  info(std::map<std::string, std::string>())
1536  {
1537  }
1538 
1542  bool result;
1543 
1548  float matchScore;
1549 
1553  std::map<std::string, std::string> info;
1554  };
1555 } // end namespace gpudb
1556 
1557 namespace avro
1558 {
1559  template<> struct codec_traits<gpudb::MatchGraphResponse>
1560  {
1561  static void encode(Encoder& e, const gpudb::MatchGraphResponse& v)
1562  {
1563  ::avro::encode(e, v.result);
1564  ::avro::encode(e, v.matchScore);
1565  ::avro::encode(e, v.info);
1566  }
1567 
1568  static void decode(Decoder& d, gpudb::MatchGraphResponse& v)
1569  {
1570  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1571  {
1572  const std::vector<size_t> fo = rd->fieldOrder();
1573 
1574  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1575  {
1576  switch (*it)
1577  {
1578  case 0:
1579  ::avro::decode(d, v.result);
1580  break;
1581 
1582  case 1:
1583  ::avro::decode(d, v.matchScore);
1584  break;
1585 
1586  case 2:
1587  ::avro::decode(d, v.info);
1588  break;
1589 
1590  default:
1591  break;
1592  }
1593  }
1594  }
1595  else
1596  {
1597  ::avro::decode(d, v.result);
1598  ::avro::decode(d, v.matchScore);
1599  ::avro::decode(d, v.info);
1600  }
1601  }
1602  };
1603 } // end namespace avro
1604 
1605 #endif // __MATCH_GRAPH_H__
std::string graphName
Name of the underlying geospatial graph resource to match to using samplePoints.
Definition: match_graph.h:895
float matchScore
The mean square error calculation representing the map matching score.
Definition: match_graph.h:1548
std::string solutionTable
The name of the table used to store the results, in [ schema_name.
Definition: match_graph.h:991
MatchGraphResponse()
Constructs a MatchGraphResponse object with default parameters.
Definition: match_graph.h:1532
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:1457
std::string solveMethod
The type of solver to use for graph matching.
Definition: match_graph.h:974
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:882
std::map< std::string, std::string > info
Additional information.
Definition: match_graph.h:1553
MatchGraphRequest()
Constructs a MatchGraphRequest object with default parameters.
Definition: match_graph.h:31
bool result
Indicates a successful solution.
Definition: match_graph.h:1542
std::vector< std::string > samplePoints
Sample points used to match to an underlying geospatial graph.
Definition: match_graph.h:909
A set of results returned by GPUdb::matchGraph.
Definition: match_graph.h:1527