MCPcopy Create free account
hub / github.com/alibaba/GraphScope / V

Method V

python/graphscope/learning/graph.py:218–249  ·  view source on GitHub ↗

Entry of GSL, starting from VERTEX. Args: t (string): The type of node which is the entry of query or the type of edge when node is from edge source or dst. feed (None| numpy.ndarray | types.GeneratorType | `Nodes`): When `feed` is not

(
        self,
        t,
        feed=None,
        node_from=graphlearn.pywrap.NodeFrom.NODE,
        mask=graphlearn.python.utils.Mask.NONE,
    )

Source from the content-addressed store, hash-verified

216 ).decode("utf-8", errors="ignore")
217
218 def V(
219 self,
220 t,
221 feed=None,
222 node_from=graphlearn.pywrap.NodeFrom.NODE,
223 mask=graphlearn.python.utils.Mask.NONE,
224 ):
225 """Entry of GSL, starting from VERTEX.
226
227 Args:
228 t (string): The type of node which is the entry of query or the type
229 of edge when node is from edge source or dst.
230 feed (None| numpy.ndarray | types.GeneratorType | `Nodes`): When `feed`
231 is not `None`, the `type` should be a node type, which means query the
232 attributes of the specified node ids.
233
234 - None: Default. Sample nodes with the following .shuffle and .batch API.
235 numpy.ndarray: Any shape of ids. Get nodes of the given ids and
236 node_type.
237 - types.Generator: A generator of numpy.ndarray. Get nodes of generated
238 ids and given node_type.
239 - `Nodes`: A `Nodes` object.
240 node_from (NodeFrom): Default is `NodeFrom.NODE`, which means sample or
241 or iterate node from node. `NodeFrom.EDGE_SRC` means sample or
242 iterate node from source node of edge, and `NodeFrom.EDGE_DST` means
243 sample or iterate node from destination node of edge. If node is from
244 edge, the `type` must be an edge type.
245 mask (NONE | TRAIN | TEST | VAL): The given node set is indexed by both the
246 raw node type and mask value. The default mask value is NONE, which plays
247 nothing on the index.
248 """
249 return super(Graph, self).V(t, feed, node_from, mask)
250
251 def E(self, edge_type, feed=None, reverse=False):
252 """Entry of GSL, starting from EDGE.

Callers 2

funcFunction · 0.45
demoFunction · 0.45

Calls

no outgoing calls

Tested by 2

funcFunction · 0.36
demoFunction · 0.36