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 
948  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_):
949  graphName( graphName_ ),
950  samplePoints( samplePoints_ ),
951  solveMethod( solveMethod_ ),
952  solutionTable( solutionTable_ ),
953  options( options_ )
954  {
955  }
956 
961  std::string graphName;
962 
975  std::vector<std::string> samplePoints;
976 
1044  std::string solveMethod;
1045 
1061  std::string solutionTable;
1062 
1564  std::map<std::string, std::string> options;
1565  };
1566 } // end namespace gpudb
1567 
1568 namespace avro
1569 {
1570  template<> struct codec_traits<gpudb::MatchGraphRequest>
1571  {
1572  static void encode(Encoder& e, const gpudb::MatchGraphRequest& v)
1573  {
1574  ::avro::encode(e, v.graphName);
1575  ::avro::encode(e, v.samplePoints);
1576  ::avro::encode(e, v.solveMethod);
1577  ::avro::encode(e, v.solutionTable);
1578  ::avro::encode(e, v.options);
1579  }
1580 
1581  static void decode(Decoder& d, gpudb::MatchGraphRequest& v)
1582  {
1583  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1584  {
1585  const std::vector<size_t> fo = rd->fieldOrder();
1586 
1587  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1588  {
1589  switch (*it)
1590  {
1591  case 0:
1592  ::avro::decode(d, v.graphName);
1593  break;
1594 
1595  case 1:
1596  ::avro::decode(d, v.samplePoints);
1597  break;
1598 
1599  case 2:
1600  ::avro::decode(d, v.solveMethod);
1601  break;
1602 
1603  case 3:
1604  ::avro::decode(d, v.solutionTable);
1605  break;
1606 
1607  case 4:
1608  ::avro::decode(d, v.options);
1609  break;
1610 
1611  default:
1612  break;
1613  }
1614  }
1615  }
1616  else
1617  {
1618  ::avro::decode(d, v.graphName);
1619  ::avro::decode(d, v.samplePoints);
1620  ::avro::decode(d, v.solveMethod);
1621  ::avro::decode(d, v.solutionTable);
1622  ::avro::decode(d, v.options);
1623  }
1624  }
1625  };
1626 } // end namespace avro
1627 
1628 namespace gpudb
1629 {
1635  {
1640  result(bool()),
1641  matchScore(float()),
1642  info(std::map<std::string, std::string>())
1643  {
1644  }
1645 
1649  bool result;
1650 
1655  float matchScore;
1656 
1660  std::map<std::string, std::string> info;
1661  };
1662 } // end namespace gpudb
1663 
1664 namespace avro
1665 {
1666  template<> struct codec_traits<gpudb::MatchGraphResponse>
1667  {
1668  static void encode(Encoder& e, const gpudb::MatchGraphResponse& v)
1669  {
1670  ::avro::encode(e, v.result);
1671  ::avro::encode(e, v.matchScore);
1672  ::avro::encode(e, v.info);
1673  }
1674 
1675  static void decode(Decoder& d, gpudb::MatchGraphResponse& v)
1676  {
1677  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1678  {
1679  const std::vector<size_t> fo = rd->fieldOrder();
1680 
1681  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1682  {
1683  switch (*it)
1684  {
1685  case 0:
1686  ::avro::decode(d, v.result);
1687  break;
1688 
1689  case 1:
1690  ::avro::decode(d, v.matchScore);
1691  break;
1692 
1693  case 2:
1694  ::avro::decode(d, v.info);
1695  break;
1696 
1697  default:
1698  break;
1699  }
1700  }
1701  }
1702  else
1703  {
1704  ::avro::decode(d, v.result);
1705  ::avro::decode(d, v.matchScore);
1706  ::avro::decode(d, v.info);
1707  }
1708  }
1709  };
1710 } // end namespace avro
1711 
1712 #endif // __MATCH_GRAPH_H__
std::string graphName
Name of the underlying geospatial graph resource to match to using samplePoints.
Definition: match_graph.h:961
float matchScore
The mean square error calculation representing the map matching score.
Definition: match_graph.h:1655
std::string solutionTable
The name of the table used to store the results, in [ schema_name.
Definition: match_graph.h:1061
MatchGraphResponse()
Constructs a MatchGraphResponse object with default parameters.
Definition: match_graph.h:1639
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:1564
std::string solveMethod
The type of solver to use for graph matching.
Definition: match_graph.h:1044
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:948
std::map< std::string, std::string > info
Additional information.
Definition: match_graph.h:1660
MatchGraphRequest()
Constructs a MatchGraphRequest object with default parameters.
Definition: match_graph.h:31
bool result
Indicates a successful solution.
Definition: match_graph.h:1649
std::vector< std::string > samplePoints
Sample points used to match to an underlying geospatial graph.
Definition: match_graph.h:975
A set of results returned by GPUdb::matchGraph.
Definition: match_graph.h:1634