graph.h
Go to the documentation of this file.
1#pragma once
2
3#include <VirtualRobot/VirtualRobot.h>
4
5#include <VisionX/interface/libraries/SemanticObjectRelations/Graph.h>
6
7#include <SemanticObjectRelations/RelationGraph/json/AttributedGraph.h>
8
9namespace armarx::semantic
10{
11
12 data::Graph toIce(const semrel::AttributedGraph& input);
13 semrel::AttributedGraph fromIce(const semantic::data::Graph& graph);
14
15 template <typename VA, typename EA, typename GA>
16 data::Graph
18 {
19 return toIce(semrel::toAttributedGraph(graph));
20 }
21
22 template <typename VA, typename EA, typename GA>
23 data::Graph
24 toIce(const semrel::RelationGraph<VA, EA, GA>& graph, const semrel::ShapeMap& objects)
25 {
26 return toIce(semrel::toAttributedGraph(graph, objects));
27 }
28
29 template <typename GraphT>
30 GraphT
31 fromIce(const semantic::data::Graph& graph)
32 {
33 return fromIce(graph).toGraph<GraphT>();
34 }
35
36} // namespace armarx::semantic
semrel::AttributedGraph fromIce(const semantic::data::Graph &graph)
data::Graph toIce(const semrel::AttributedGraph &input)
Definition graph.cpp:15