dgl.rst 1.93 KB
Newer Older
Minjie Wang's avatar
Minjie Wang committed
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
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
109
110
111
112
113
114
115
116
117
118
119
.. _apidgl:

dgl
=============================

.. currentmodule:: dgl

Graph Create Ops
-------------------------

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

    graph
    heterograph
    from_scipy
    from_networkx
    bipartite_from_scipy
    bipartite_from_networkx
    rand_graph
    rand_bipartite
    knn_graph
    segmented_knn_graph

Subgraph Extraction Routines
-------------------------------------

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

    node_subgraph
    edge_subgraph
    node_type_subgraph
    edge_type_subgraph
    in_subgraph
    out_subgraph

Graph Mutation Routines
---------------------------------

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

    add_nodes
    add_edges
    remove_nodes
    remove_edges
    add_self_loop
    remove_self_loop
    add_reverse_edges

Graph Transform Routines
----------------------------------

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

    reverse
    to_bidirected
    to_simple
    to_block
    compact_graphs
    to_hetero
    to_homo
    to_networkx
    line_graph
    khop_graph
    metapath_reachable_graph

Batching and Reading Out
-------------------------------

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

    batch
    unbatch
    readout_nodes
    readout_edges
    sum_nodes
    sum_edges
    mean_nodes
    mean_edges
    max_nodes
    max_edges
    softmax_nodes
    softmax_edges
    broadcast_nodes
    broadcast_edges
    topk_nodes
    topk_edges

Adjacency Related Routines
-------------------------------

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

    khop_adj
    laplacian_lambda_max

Propagate Messages by Traversals
------------------------------------------

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

    prop_nodes
    prop_nodes_bfs
    prop_nodes_topo
    prop_edges
    prop_edges_dfs

Utilities
-----------------------------------------------
.. autosummary::
    :toctree: ../../generated/

    seed
Jinjing Zhou's avatar
Jinjing Zhou committed
120
121
    save_graphs
    load_graphs