"docs/source/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "17f863569e45a0cc2da9955985fe9a63c0b6ab14"
Unverified Commit a1cdc7a5 authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

minor docstring fix (#910)

parent 3ee7e112
...@@ -49,17 +49,7 @@ class DGLHeteroGraph(object): ...@@ -49,17 +49,7 @@ class DGLHeteroGraph(object):
{rank=sink; Nintendo; Mojang} {rank=sink; Nintendo; Mojang}
} }
One can analyze the graph and figure out the metagraph as follows: And suppose that one maps the users, games and developers to the following
.. graphviz::
digraph G {
User -> User [label=follows]
User -> Game [label=plays]
Developer -> Game [label=develops]
}
Suppose that one maps the users, games and developers to the following
IDs: IDs:
========= ===== === ===== ========= ===== === =====
...@@ -158,6 +148,24 @@ class DGLHeteroGraph(object): ...@@ -158,6 +148,24 @@ class DGLHeteroGraph(object):
>>> g['plays'].number_of_nodes() # ERROR!! There are two types 'user' and 'game'. >>> g['plays'].number_of_nodes() # ERROR!! There are two types 'user' and 'game'.
>>> g['plays'].number_of_edges() # OK!! because there is only one edge type 'plays' >>> g['plays'].number_of_edges() # OK!! because there is only one edge type 'plays'
Metagraph
---------
For each heterogeneous graph, one can often infer the *metagraph*, the template of
edge connections showing how many types of nodes and edges exist in the graph, and
how each edge type could connect between node types.
One can analyze the example gameplay graph above and figure out the metagraph as
follows:
.. graphviz::
digraph G {
User -> User [label=follows]
User -> Game [label=plays]
Developer -> Game [label=develops]
}
Parameters Parameters
---------- ----------
gidx : HeteroGraphIndex gidx : HeteroGraphIndex
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment