"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "f38e3626cdc0fe55e82f09ac4bb915f5612375ce"
Unverified Commit d8101fe4 authored by Mingbang Wang's avatar Mingbang Wang Committed by GitHub
Browse files

[Misc] Create SamplingGraph Class (#6394)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-39-125.ap-northeast-1.compute.internal>
Co-authored-by: default avatarHongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
parent 43b45ab6
"""Sampling Graphs."""
from typing import Dict, Union
class SamplingGraph:
r"""Class for sampling graph."""
def __init__(self):
pass
@property
def num_nodes(self) -> Union[int, Dict[str, int]]:
"""The number of nodes in the graph.
- If the graph is homogenous, returns an integer.
- If the graph is heterogenous, returns a dictionary.
Returns
-------
Union[int, Dict[str, int]]
The number of nodes. Integer indicates the total nodes number of a
homogenous graph; dict indicates nodes number per node types of a
heterogenous graph.
"""
raise NotImplementedError
@property
def num_edges(self) -> Union[int, Dict[str, int]]:
"""The number of edges in the graph.
- If the graph is homogenous, returns an integer.
- If the graph is heterogenous, returns a dictionary.
Returns
-------
Union[int, Dict[str, int]]
The number of edges. Integer indicates the total edges number of a
homogenous graph; dict indicates edges number per edge types of a
heterogenous graph.
"""
raise NotImplementedError
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