graph_serializer.h 542 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*!
 *  Copyright (c) 2018 by Contributors
 * \file graph/graph_serializer.cc
 * \brief DGL serializer APIs
 */

#pragma once

#include <dgl/immutable_graph.h>
#include "heterograph.h"
#include "unit_graph.h"

namespace dgl {

class Serializer {
 public:
  static HeteroGraph* EmptyHeteroGraph() { return new HeteroGraph(); }
  static ImmutableGraph* EmptyImmutableGraph() {
    return new ImmutableGraph(static_cast<COOPtr>(nullptr));
  }
  static UnitGraph* EmptyUnitGraph() {
    return UnitGraph::EmptyGraph();
  }
};
}  // namespace dgl