validate_graph

Function validate_graph 

Source
pub fn validate_graph<T, S>(matrix: &S, directed: bool) -> SparseResult<()>
where T: Float + Debug + Copy + 'static, S: SparseArray<T>,
Expand description

Check if a sparse matrix represents a valid graph

§Arguments

  • matrix - The sparse matrix to check
  • directed - Whether the graph is directed

§Returns

Result indicating if the matrix is a valid graph