Skip to content

Commit

Permalink
[Hetero] Doc (dmlc#892)
Browse files Browse the repository at this point in the history
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* style fixes & undefined name fix

* transpose=False in test
  • Loading branch information
mufeili authored and BarclayII committed Oct 6, 2019
1 parent b3d596b commit e2b7f74
Show file tree
Hide file tree
Showing 9 changed files with 1,602 additions and 625 deletions.
4 changes: 2 additions & 2 deletions docs/source/api/python/graph.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _apigraph:

DGLGraph -- Graph with node/edge features
DGLGraph -- Untyped graph with node/edge features
=========================================

.. currentmodule:: dgl
Expand Down Expand Up @@ -79,7 +79,6 @@ Converting from/to other format
DGLGraph.adjacency_matrix
DGLGraph.adjacency_matrix_scipy
DGLGraph.incidence_matrix
DGLGraph.to

Using Node/edge features
------------------------
Expand Down Expand Up @@ -121,3 +120,4 @@ Computing with DGLGraph
DGLGraph.prop_edges
DGLGraph.filter_nodes
DGLGraph.filter_edges
DGLGraph.to
119 changes: 119 additions & 0 deletions docs/source/api/python/heterograph.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
.. _apiheterograph:

DGLHeteroGraph -- Typed graph with node/edge features
=====================================================

.. currentmodule:: dgl
.. autoclass:: DGLHeteroGraph

Conversion to and from heterogeneous graphs
-----------------------------------------

.. automodule:: dgl.convert
.. currentmodule:: dgl

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

graph
bipartite
hetero_from_relations
to_hetero
to_homo
to_networkx
DGLHeteroGraph.adjacency_matrix
DGLHeteroGraph.incidence_matrix

Querying metagraph structure
----------------------------

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

DGLHeteroGraph.ntypes
DGLHeteroGraph.etypes
DGLHeteroGraph.canonical_etypes
DGLHeteroGraph.metagraph
DGLHeteroGraph.to_canonical_etype
DGLHeteroGraph.get_ntype_id
DGLHeteroGraph.get_etype_id

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

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

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

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

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

DGLHeteroGraph.nodes
DGLHeteroGraph.ndata
DGLHeteroGraph.edges
DGLHeteroGraph.edata
DGLHeteroGraph.node_attr_schemes
DGLHeteroGraph.edge_attr_schemes
DGLHeteroGraph.set_n_initializer
DGLHeteroGraph.set_e_initializer
DGLHeteroGraph.local_var
DGLHeteroGraph.local_scope

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

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

DGLHeteroGraph.subgraph
DGLHeteroGraph.edge_subgraph
DGLHeteroGraph.node_type_subgraph
DGLHeteroGraph.edge_type_subgraph

Computing with DGLHeteroGraph
-----------------------------

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

DGLHeteroGraph.apply_nodes
DGLHeteroGraph.apply_edges
DGLHeteroGraph.group_apply_edges
DGLHeteroGraph.send
DGLHeteroGraph.recv
DGLHeteroGraph.multi_recv
DGLHeteroGraph.send_and_recv
DGLHeteroGraph.multi_send_and_recv
DGLHeteroGraph.pull
DGLHeteroGraph.multi_pull
DGLHeteroGraph.push
DGLHeteroGraph.update_all
DGLHeteroGraph.multi_update_all
DGLHeteroGraph.prop_nodes
DGLHeteroGraph.prop_edges
DGLHeteroGraph.filter_nodes
DGLHeteroGraph.filter_edges
DGLHeteroGraph.to
1 change: 1 addition & 0 deletions docs/source/api/python/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ API Reference
:maxdepth: 2

graph
heterograph
init
batch
function
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/python/subgraph.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _apigraph:
.. _apisubgraph:

DGLSubGraph -- Class for subgraph data structure
================================================
Expand Down
Loading

0 comments on commit e2b7f74

Please sign in to comment.