Package aud.graph

Class AdjacencyMatrix<Edge>

Type Parameters:
Edge - edge data
All Implemented Interfaces:
Iterable<Edge>

public class AdjacencyMatrix<Edge> extends SparseMatrix<Edge> implements Iterable<Edge>
Sparse adjacency matrix.

  • Constructor Details

    • AdjacencyMatrix

      public AdjacencyMatrix(boolean symmetric)
      create empty matrix
  • Method Details

    • clearColumnAndRow

      public void clearColumnAndRow(int idx)
      Set all entries in row idx and column idx to null.

      Note that this method does not shift indices (coordinates) but only "overwrites" existing entries.

    • iterator

      public Iterator<Edge> iterator()
      Get iterator over all edges.

      For a symmetric matrix, every (undirected) edges is enumerated only once.

      Specified by:
      iterator in interface Iterable<Edge>
      See Also: