Support getting nodes number and edge number methods for Graph.
Open
component:python
enhancement
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 468
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
Add the following methods for `Graph`:
```python
def number_of_nodes(label=None):
"""Return the number of nodes under a specified label.
If label is None, then return the number of nodes of the whole graph.
"""
pass
def number_of_edges(label=None):
"""Return the number of nodes under a specified label.
If label is None, then return the number of edges of the whole graph.
"""
pass
```
Contributor guide
Assessment
This issue has not been assessed yet.