has_isolated_nodes
¶
Function to check for isolated nodes. (i.e. nodes that don't have a link to any other nodes )
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edge_index
|
array
|
Edge index on which to check for isolated nodes. |
required |
num_nodes
|
int
|
Number of nodes of the graph. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A boolean of whether the graph has isolated nodes. |
Example:
Source code in mlx_graphs/utils/transformations.py
from mlx_graphs.utils.transformations import has_isolated_nodes · mlx_graphs/utils/transformations.py