--- /dev/null
+#include "Set.h"
+
+namespace neurun
+{
+namespace graph
+{
+namespace operation
+{
+
+Index Set::append(std::unique_ptr<Node> &&node)
+{
+ uint32_t index = _nodes.size();
+
+ _nodes.emplace_back(std::move(node));
+
+ return Index{index};
+}
+
+const Node &Set::at(const Index &index) const { return *(_nodes.at(index.asInt())); }
+
+Node &Set::at(const Index &index) { return *(_nodes.at(index.asInt())); }
+
+bool Set::exist(const Index &index) const { return index.asInt() < _nodes.size(); }
+
+void Set::iterate(const std::function<void(const Index &, const Node &)> &fn) const
+{
+ for (uint32_t index = 0; index < _nodes.size(); index++)
+ {
+ fn(Index{index}, *_nodes[index]);
+ }
+}
+
+} // namespace operation
+} // namespace graph
+} // namespace neurun
--- /dev/null
+#ifndef __NEURUN_GRAPH_OPERATION_SET_H__
+#define __NEURUN_GRAPH_OPERATION_SET_H__
+
+#include <memory>
+
+#include "graph/operation/Index.h"
+#include "Node.h"
+#include "internal/Model.h"
+
+namespace neurun
+{
+namespace graph
+{
+namespace operation
+{
+
+class Set
+{
+public:
+ Set() = default;
+
+public:
+ Index append(std::unique_ptr<Node> &&node);
+
+public:
+ const Node &at(const Index &) const;
+ Node &at(const Index &);
+ bool exist(const Index &) const;
+ uint32_t size() const { return _nodes.size(); }
+ void iterate(const std::function<void(const Index &, const Node &)> &fn) const;
+
+private:
+ std::vector<std::unique_ptr<Node>> _nodes;
+};
+
+} // namespace operation
+} // namespace graph
+} // namespace neurun
+
+#endif // __NEURUN_GRAPH_OPERATION_SET_H__
--- /dev/null
+#include <gtest/gtest.h>
+
+#include "graph/operation/Set.h"
+
+using neurun::graph::operation::Set;
+using neurun::graph::operation::Node;
+using neurun::graph::operation::Index;
+
+class TestNode : public Node
+{
+public:
+ TestNode() = default;
+
+public:
+ virtual neurun::graph::operand::IndexSet inputs() const { return {1, 2, 3, 4}; }
+ virtual neurun::graph::operand::IndexSet outputs() const { return {1, 2, 3}; }
+ virtual const ::internal::tflite::op::Node *op() const { return nullptr; }
+};
+
+TEST(graph_operation_Set, operation_test)
+{
+ Set set;
+ set.append(std::unique_ptr<Node>(new TestNode()));
+ Index idx{0u};
+ ASSERT_EQ(set.at(idx).inputs().size(), 4);
+ ASSERT_EQ(set.at(idx).outputs().size(), 3);
+}