Class UndirectedGraph

  • All Implemented Interfaces:

    
    public class UndirectedGraph
    
                        

    An undirected graph data structure with weighted edges represented as an adjacency matrix.

    This class provides graph algorithms for undirected graphs including connected component detection and graph analysis. The adjacency matrix is symmetric, with edges (i,j) and (j,i) having the same weight.

    Key features:

    • Weakly connected component (WCC) detection
    • Symmetric adjacency matrix representation
    • Weighted edge support with normalization options
    • Column filtering for selective analysis
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final Set<Set<Integer>> wcc
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • UndirectedGraph

        UndirectedGraph(Matrix param, Set<Integer> colsToIgnore)
        Constructs an undirected graph with the given adjacency matrix and column filter.
        Parameters:
        param - adjacency matrix where entry (i,j) represents edge weight
        colsToIgnore - set of column indices to ignore, can be null
      • UndirectedGraph

        UndirectedGraph(Matrix param, Set<Integer> colsToIgnore, boolean normalize)
        Constructs an undirected graph with optional weight normalization.
        Parameters:
        param - adjacency matrix where entry (i,j) represents edge weight
        colsToIgnore - set of column indices to ignore, can be null
        normalize - if true, weights are averaged for links (i,j) and (j,i); if false, weights are summed
      • UndirectedGraph

        UndirectedGraph(Matrix param)