Package samer.maths

Class Matrix

  • java.lang.Object
    • Jama.Matrix
      • samer.maths.Matrix
  • All Implemented Interfaces:
    Mat


    public class Matrix
    extends Jama.Matrix
    implements Mat
    Represents a bundling of a Jama.Matrix with Viewable bits. Create one of these and you can either keep it invisible, expose its UI yourself, or let the Viewable framework expose a default viewer automatically
    • Constructor Detail

      • Matrix

        public Matrix(double[][] array)
      • Matrix

        public Matrix(int m,
                      int n)
      • Matrix

        public Matrix(java.lang.String name,
                      int m,
                      int n)
      • Matrix

        public Matrix(java.lang.String name,
                      int m,
                      int n,
                      int flags)
    • Method Detail

      • observable

        public java.util.Observable observable()
      • viewable

        public Viewable viewable()
      • equals

        public boolean equals(java.util.Observable o)
      • getNode

        public Node getNode()
      • changed

        public final void changed(java.lang.Object o)
      • changed

        public final void changed()
      • addObserver

        public void addObserver(java.util.Observer o)
      • deleteObserver

        public void deleteObserver(java.util.Observer o)
      • dispose

        public void dispose()
      • copyFrom

        public void copyFrom(double[][] src)
      • toString

        public java.lang.String toString()
      • width

        public int width()
        Specified by:
        width in interface Mat
      • height

        public int height()
        Specified by:
        height in interface Mat
      • getAgent

        public Agent getAgent()
      • apply

        public void apply(Function f)
      • identity

        public void identity()
        Set to identity matrix
      • identity

        public static Jama.Matrix identity(Jama.Matrix a)
      • zero

        public void zero()
        Set to zero matrix
      • assign

        public void assign(Jama.Matrix b)
        Set to given matrix (need to make sure both matrices are the same size)
        Parameters:
        b - the matrix to be copied
      • load

        public void load(java.io.InputStream in)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • save

        public void save(java.io.OutputStream out)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • write

        public void write(java.io.Writer wr)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • read

        public void read(java.io.Reader rdr)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • symmetrise

        public void symmetrise()
        Symmetrise in place preserving trace. Will fail if matrix is not square.
      • antisymmetrise

        public void antisymmetrise()
        Antisymmetrise in place. Will fail if matrix is not square.
      • logdet

        public double logdet()
        return log(abs(det(this))) (must be square matrix)
      • getRow

        public Vec getRow(int k)
      • getColumn

        public Vec getColumn(int k)
      • getDiagonal

        public static Vec getDiagonal(Jama.Matrix A)