Class MarkovClustering.NormalizeVisitor

  • All Implemented Interfaces:
    org.apache.commons.math3.linear.RealMatrixChangingVisitor
    Enclosing class:
    MarkovClustering<V,​E>

    public static class MarkovClustering.NormalizeVisitor
    extends org.apache.commons.math3.linear.DefaultRealMatrixChangingVisitor
    Visitor that normalizes columns.
    • Constructor Detail

      • NormalizeVisitor

        public NormalizeVisitor​(org.apache.commons.math3.linear.RealMatrix sums)
        Create an instance of the normalizer.
        Parameters:
        sums - the column vector containing row sums
    • Method Detail

      • visit

        public double visit​(int row,
                            int column,
                            double value)
        Divide the value of a single element by the corresponding column of sums.
        Specified by:
        visit in interface org.apache.commons.math3.linear.RealMatrixChangingVisitor
        Overrides:
        visit in class org.apache.commons.math3.linear.DefaultRealMatrixChangingVisitor
        Parameters:
        row - row
        column - column
        value - the value
        Returns:
        the normalized value