GPUdb C++ API  Version 7.2.2.4
visualize_isochrone.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 __VISUALIZE_ISOCHRONE_H__
7 #define __VISUALIZE_ISOCHRONE_H__
8 
9 namespace gpudb
10 {
24  {
30  graphName(std::string()),
31  sourceNode(std::string()),
32  maxSolutionRadius(double()),
33  weightsOnEdges(std::vector<std::string>()),
34  restrictions(std::vector<std::string>()),
35  numLevels(int32_t()),
36  generateImage(bool()),
37  levelsTable(std::string()),
38  styleOptions(std::map<std::string, std::string>()),
39  solveOptions(std::map<std::string, std::string>()),
40  contourOptions(std::map<std::string, std::string>()),
41  options(std::map<std::string, std::string>())
42  {
43  }
44 
779  VisualizeIsochroneRequest(const std::string& graphName_, const std::string& sourceNode_, const double maxSolutionRadius_, const std::vector<std::string>& weightsOnEdges_, const std::vector<std::string>& restrictions_, const int32_t numLevels_, const bool generateImage_, const std::string& levelsTable_, const std::map<std::string, std::string>& styleOptions_, const std::map<std::string, std::string>& solveOptions_, const std::map<std::string, std::string>& contourOptions_, const std::map<std::string, std::string>& options_):
780  graphName( graphName_ ),
781  sourceNode( sourceNode_ ),
782  maxSolutionRadius( maxSolutionRadius_ ),
783  weightsOnEdges( weightsOnEdges_ ),
784  restrictions( restrictions_ ),
785  numLevels( numLevels_ ),
786  generateImage( generateImage_ ),
787  levelsTable( levelsTable_ ),
788  styleOptions( styleOptions_ ),
789  solveOptions( solveOptions_ ),
790  contourOptions( contourOptions_ ),
791  options( options_ )
792  {
793  }
794 
798  std::string graphName;
799 
804  std::string sourceNode;
805 
811 
826  std::vector<std::string> weightsOnEdges;
827 
848  std::vector<std::string> restrictions;
849 
854  int32_t numLevels;
855 
867 
878  std::string levelsTable;
879 
1067  std::map<std::string, std::string> styleOptions;
1068 
1102  std::map<std::string, std::string> solveOptions;
1103 
1228  std::map<std::string, std::string> contourOptions;
1229 
1314  std::map<std::string, std::string> options;
1315  };
1316 } // end namespace gpudb
1317 
1318 namespace avro
1319 {
1320  template<> struct codec_traits<gpudb::VisualizeIsochroneRequest>
1321  {
1322  static void encode(Encoder& e, const gpudb::VisualizeIsochroneRequest& v)
1323  {
1324  ::avro::encode(e, v.graphName);
1325  ::avro::encode(e, v.sourceNode);
1326  ::avro::encode(e, v.maxSolutionRadius);
1327  ::avro::encode(e, v.weightsOnEdges);
1328  ::avro::encode(e, v.restrictions);
1329  ::avro::encode(e, v.numLevels);
1330  ::avro::encode(e, v.generateImage);
1331  ::avro::encode(e, v.levelsTable);
1332  ::avro::encode(e, v.styleOptions);
1333  ::avro::encode(e, v.solveOptions);
1334  ::avro::encode(e, v.contourOptions);
1335  ::avro::encode(e, v.options);
1336  }
1337 
1338  static void decode(Decoder& d, gpudb::VisualizeIsochroneRequest& v)
1339  {
1340  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1341  {
1342  const std::vector<size_t> fo = rd->fieldOrder();
1343 
1344  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1345  {
1346  switch (*it)
1347  {
1348  case 0:
1349  ::avro::decode(d, v.graphName);
1350  break;
1351 
1352  case 1:
1353  ::avro::decode(d, v.sourceNode);
1354  break;
1355 
1356  case 2:
1357  ::avro::decode(d, v.maxSolutionRadius);
1358  break;
1359 
1360  case 3:
1361  ::avro::decode(d, v.weightsOnEdges);
1362  break;
1363 
1364  case 4:
1365  ::avro::decode(d, v.restrictions);
1366  break;
1367 
1368  case 5:
1369  ::avro::decode(d, v.numLevels);
1370  break;
1371 
1372  case 6:
1373  ::avro::decode(d, v.generateImage);
1374  break;
1375 
1376  case 7:
1377  ::avro::decode(d, v.levelsTable);
1378  break;
1379 
1380  case 8:
1381  ::avro::decode(d, v.styleOptions);
1382  break;
1383 
1384  case 9:
1385  ::avro::decode(d, v.solveOptions);
1386  break;
1387 
1388  case 10:
1389  ::avro::decode(d, v.contourOptions);
1390  break;
1391 
1392  case 11:
1393  ::avro::decode(d, v.options);
1394  break;
1395 
1396  default:
1397  break;
1398  }
1399  }
1400  }
1401  else
1402  {
1403  ::avro::decode(d, v.graphName);
1404  ::avro::decode(d, v.sourceNode);
1405  ::avro::decode(d, v.maxSolutionRadius);
1406  ::avro::decode(d, v.weightsOnEdges);
1407  ::avro::decode(d, v.restrictions);
1408  ::avro::decode(d, v.numLevels);
1409  ::avro::decode(d, v.generateImage);
1410  ::avro::decode(d, v.levelsTable);
1411  ::avro::decode(d, v.styleOptions);
1412  ::avro::decode(d, v.solveOptions);
1413  ::avro::decode(d, v.contourOptions);
1414  ::avro::decode(d, v.options);
1415  }
1416  }
1417  };
1418 } // end namespace avro
1419 
1420 namespace gpudb
1421 {
1428  {
1434  width(int32_t()),
1435  height(int32_t()),
1436  bgColor(int64_t()),
1437  imageData(std::vector<uint8_t>()),
1438  info(std::map<std::string, std::string>()),
1439  solveInfo(std::map<std::string, std::string>()),
1440  contourInfo(std::map<std::string, std::string>())
1441  {
1442  }
1443 
1448  int32_t width;
1449 
1454  int32_t height;
1455 
1460  int64_t bgColor;
1461 
1465  std::vector<uint8_t> imageData;
1466 
1470  std::map<std::string, std::string> info;
1471 
1475  std::map<std::string, std::string> solveInfo;
1476 
1480  std::map<std::string, std::string> contourInfo;
1481  };
1482 } // end namespace gpudb
1483 
1484 namespace avro
1485 {
1486  template<> struct codec_traits<gpudb::VisualizeIsochroneResponse>
1487  {
1488  static void encode(Encoder& e, const gpudb::VisualizeIsochroneResponse& v)
1489  {
1490  ::avro::encode(e, v.width);
1491  ::avro::encode(e, v.height);
1492  ::avro::encode(e, v.bgColor);
1493  ::avro::encode(e, v.imageData);
1494  ::avro::encode(e, v.info);
1495  ::avro::encode(e, v.solveInfo);
1496  ::avro::encode(e, v.contourInfo);
1497  }
1498 
1499  static void decode(Decoder& d, gpudb::VisualizeIsochroneResponse& v)
1500  {
1501  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
1502  {
1503  const std::vector<size_t> fo = rd->fieldOrder();
1504 
1505  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
1506  {
1507  switch (*it)
1508  {
1509  case 0:
1510  ::avro::decode(d, v.width);
1511  break;
1512 
1513  case 1:
1514  ::avro::decode(d, v.height);
1515  break;
1516 
1517  case 2:
1518  ::avro::decode(d, v.bgColor);
1519  break;
1520 
1521  case 3:
1522  ::avro::decode(d, v.imageData);
1523  break;
1524 
1525  case 4:
1526  ::avro::decode(d, v.info);
1527  break;
1528 
1529  case 5:
1530  ::avro::decode(d, v.solveInfo);
1531  break;
1532 
1533  case 6:
1534  ::avro::decode(d, v.contourInfo);
1535  break;
1536 
1537  default:
1538  break;
1539  }
1540  }
1541  }
1542  else
1543  {
1544  ::avro::decode(d, v.width);
1545  ::avro::decode(d, v.height);
1546  ::avro::decode(d, v.bgColor);
1547  ::avro::decode(d, v.imageData);
1548  ::avro::decode(d, v.info);
1549  ::avro::decode(d, v.solveInfo);
1550  ::avro::decode(d, v.contourInfo);
1551  }
1552  }
1553  };
1554 } // end namespace avro
1555 
1556 #endif // __VISUALIZE_ISOCHRONE_H__
std::map< std::string, std::string > info
Additional information.
VisualizeIsochroneRequest()
Constructs a VisualizeIsochroneRequest object with default parameters.
VisualizeIsochroneResponse()
Constructs a VisualizeIsochroneResponse object with default parameters.
std::map< std::string, std::string > styleOptions
Various style related options of the isochrone image.
int64_t bgColor
Background color of the image as provided in bg_color.
std::vector< uint8_t > imageData
Generated contour image data.
int32_t numLevels
Number of equally-separated isochrones to compute.
double maxSolutionRadius
Extent of the search radius around sourceNode.
bool generateImage
If set to true, generates a PNG image of the isochrones in the response.
std::string sourceNode
Starting vertex on the underlying graph from/to which the isochrones are created.
int32_t height
Height of the image as provided in height.
A set of parameters for GPUdb::visualizeIsochrone.
std::vector< std::string > weightsOnEdges
Additional weights to apply to the edges of an existing graph.
VisualizeIsochroneRequest(const std::string &graphName_, const std::string &sourceNode_, const double maxSolutionRadius_, const std::vector< std::string > &weightsOnEdges_, const std::vector< std::string > &restrictions_, const int32_t numLevels_, const bool generateImage_, const std::string &levelsTable_, const std::map< std::string, std::string > &styleOptions_, const std::map< std::string, std::string > &solveOptions_, const std::map< std::string, std::string > &contourOptions_, const std::map< std::string, std::string > &options_)
Constructs a VisualizeIsochroneRequest object with the specified parameters.
std::map< std::string, std::string > solveInfo
Additional information.
std::map< std::string, std::string > options
Additional parameters.
std::string levelsTable
Name of the table to output the isochrones to, in [ schema_name.
std::string graphName
Name of the graph on which the isochrone is to be computed.
A set of results returned by GPUdb::visualizeIsochrone.
std::map< std::string, std::string > solveOptions
Solver specific parameters.
std::map< std::string, std::string > contourInfo
Additional information.
std::vector< std::string > restrictions
Additional restrictions to apply to the nodes/edges of an existing graph.
int32_t width
Width of the image as provided in width.
std::map< std::string, std::string > contourOptions
Solver specific parameters.