rllm.utils.is_undirected

class rllm.utils.is_undirected(adj: Tensor)[source]

Bases:

Check if the given adjacency matrix represents an undirected graph.

Parameters:

adj (Tensor) – The adjacency matrix in sparse COO format.

Returns:

True if the graph is undirected, False otherwise.

Return type:

bool