graph.rst 2.19 KB
Newer Older
Minjie Wang's avatar
Minjie Wang committed
1
.. _apigraph:
Minjie Wang's avatar
Minjie Wang committed
2

Minjie Wang's avatar
Minjie Wang committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
DGLGraph -- Graph with node/edge features
=========================================

.. currentmodule:: dgl
.. autoclass:: DGLGraph

Adding nodes and edges
----------------------

.. autosummary::
    :toctree: ../../generated/

    DGLGraph.__init__
    DGLGraph.add_nodes
    DGLGraph.add_edge
    DGLGraph.add_edges
    DGLGraph.clear

Querying graph structure
------------------------

.. autosummary::
    :toctree: ../../generated/

    DGLGraph.number_of_nodes
    DGLGraph.number_of_edges
    DGLGraph.__len__
    DGLGraph.is_multigraph
    DGLGraph.has_node
    DGLGraph.has_nodes
    DGLGraph.__contains__
    DGLGraph.has_edge_between
    DGLGraph.has_edges_between
    DGLGraph.predecessors
    DGLGraph.successors
    DGLGraph.edge_id
    DGLGraph.edge_ids
    DGLGraph.find_edges
    DGLGraph.in_edges
    DGLGraph.out_edges
    DGLGraph.all_edges
    DGLGraph.in_degree
    DGLGraph.in_degrees
    DGLGraph.out_degree
    DGLGraph.out_degrees

Transforming graph
------------------

.. autosummary::
    :toctree: ../../generated/

    DGLGraph.subgraph
    DGLGraph.subgraphs
    DGLGraph.edge_subgraph
    DGLGraph.line_graph

Converting from/to other format
-------------------------------

.. autosummary::
    :toctree: ../../generated/

    DGLGraph.to_networkx
    DGLGraph.from_networkx
    DGLGraph.from_scipy_sparse_matrix
    DGLGraph.adjacency_matrix
    DGLGraph.incidence_matrix

Using Node/edge features
------------------------

.. autosummary::
    :toctree: ../../generated/

    DGLGraph.nodes
    DGLGraph.edges
    DGLGraph.ndata
    DGLGraph.edata
    DGLGraph.node_attr_schemes
    DGLGraph.edge_attr_schemes
    DGLGraph.set_n_initializer
    DGLGraph.set_e_initializer

Computing with DGLGraph
-----------------------

.. autosummary::
    :toctree: ../../generated/

    DGLGraph.register_message_func
    DGLGraph.register_reduce_func
    DGLGraph.register_apply_node_func
    DGLGraph.register_apply_edge_func
    DGLGraph.apply_nodes
    DGLGraph.apply_edges
    DGLGraph.send
    DGLGraph.recv
    DGLGraph.send_and_recv
    DGLGraph.pull
    DGLGraph.push
    DGLGraph.update_all
    DGLGraph.prop_nodes
    DGLGraph.prop_edges
    DGLGraph.filter_nodes
    DGLGraph.filter_edges