is_directed
¶
Determines whether a graph is directed based on the given edge index and optional edge features.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edge_index
|
array
|
The edge index of the graph. |
required |
edge_features
|
Optional[array]
|
Edge features associated with each edge. If provided, the function considers both edge indices and features for the check. |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the graph is directed, False otherwise. |
Source code in mlx_graphs/utils/topology.py
from mlx_graphs.utils.topology import is_directed · mlx_graphs/utils/topology.py