Class MatrixSparse


  • public class MatrixSparse
    extends java.lang.Object
    MatrixSparse
    Version:
    1.0 2008 MvK: Start implementation
    Author:
    Modest von Korff
    • Constructor Summary

      Constructors 
      Constructor Description
      MatrixSparse​(int rows, int cols)  
      MatrixSparse​(java.io.File fi)  
      MatrixSparse​(java.io.File fi, int rows)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int cols()  
      double get​(int row, int col)  
      double[] getArray()  
      Matrix getMatrixK()  
      void init()  
      int rows()  
      void set​(int row, int col, double v)  
      java.lang.String toString()  
      java.lang.String toString​(java.text.NumberFormat nf)  
      java.lang.String toStringRow​(int row, java.text.NumberFormat nf)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MatrixSparse

        public MatrixSparse​(java.io.File fi)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • MatrixSparse

        public MatrixSparse​(java.io.File fi,
                            int rows)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • MatrixSparse

        public MatrixSparse​(int rows,
                            int cols)
    • Method Detail

      • init

        public void init()
      • set

        public void set​(int row,
                        int col,
                        double v)
      • get

        public double get​(int row,
                          int col)
        Parameters:
        row -
        col -
        Returns:
        NaN if the value was not set.
      • getArray

        public double[] getArray()
      • getMatrixK

        public Matrix getMatrixK()
      • cols

        public int cols()
      • rows

        public int rows()
      • toStringRow

        public java.lang.String toStringRow​(int row,
                                            java.text.NumberFormat nf)
      • toString

        public java.lang.String toString​(java.text.NumberFormat nf)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object