6 #ifndef __CREATE_GRAPH_H__ 7 #define __CREATE_GRAPH_H__ 34 nodes(std::vector<std::string>()),
35 edges(std::vector<std::string>()),
36 weights(std::vector<std::string>()),
38 options(std::map<std::string, std::string>())
309 CreateGraphRequest(
const std::string& graphName_,
const bool directedGraph_,
const std::vector<std::string>& nodes_,
const std::vector<std::string>& edges_,
const std::vector<std::string>& weights_,
const std::vector<std::string>& restrictions_,
const std::map<std::string, std::string>& options_):
533 template<>
struct codec_traits<
gpudb::CreateGraphRequest>
539 ::avro::encode(e, v.
nodes);
540 ::avro::encode(e, v.
edges);
548 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
550 const std::vector<size_t> fo = rd->fieldOrder();
552 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
565 ::avro::decode(d, v.
nodes);
569 ::avro::decode(d, v.
edges);
593 ::avro::decode(d, v.
nodes);
594 ::avro::decode(d, v.
edges);
620 info(std::map<std::string, std::string>())
648 std::map<std::string, std::string>
info;
654 template<>
struct codec_traits<
gpudb::CreateGraphResponse>
658 ::avro::encode(e, v.
result);
662 ::avro::encode(e, v.
info);
667 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
669 const std::vector<size_t> fo = rd->fieldOrder();
671 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
676 ::avro::decode(d, v.
result);
692 ::avro::decode(d, v.
info);
702 ::avro::decode(d, v.
result);
706 ::avro::decode(d, v.
info);
712 #endif // __CREATE_GRAPH_H__ std::vector< std::string > edges
Edges represent the required fundamental topological unit of a graph that typically connect nodes.
CreateGraphResponse()
Constructs a CreateGraphResponse object with default parameters.
int64_t numNodes
Total number of nodes created.
std::string graphName
Name of the graph resource to generate.
bool result
Indicates a successful creation on all servers.
CreateGraphRequest()
Constructs a CreateGraphRequest object with default parameters.
CreateGraphRequest(const std::string &graphName_, const bool directedGraph_, const std::vector< std::string > &nodes_, const std::vector< std::string > &edges_, const std::vector< std::string > &weights_, const std::vector< std::string > &restrictions_, const std::map< std::string, std::string > &options_)
Constructs a CreateGraphRequest object with the specified parameters.
std::map< std::string, std::string > info
Additional information.
A set of results returned by GPUdb::createGraph.
std::vector< int64_t > edgesIds
[Deprecated] Edges given as pairs of node indices.
std::map< std::string, std::string > options
Optional parameters.
std::vector< std::string > nodes
Nodes represent fundamental topological units of a graph.
std::vector< std::string > weights
Weights represent a method of informing the graph solver of the cost of including a given edge in a s...
A set of parameters for GPUdb::createGraph.
bool directedGraph
If set to true, the graph will be directed.
int64_t numEdges
Total number of edges created.
std::vector< std::string > restrictions
Restrictions represent a method of informing the graph solver which edges and/or nodes should be igno...