Package samer.maths
Class Matrix
- java.lang.Object
-
- Jama.Matrix
-
- samer.maths.Matrix
-
-
Constructor Summary
Constructors Constructor and Description Matrix(double[][] array)
Matrix(int m, int n)
Matrix(java.lang.String name, int m, int n)
Matrix(java.lang.String name, int m, int n, int flags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
add(Generator g)
void
addObserver(java.util.Observer o)
void
antisymmetrise()
Antisymmetrise in place.void
apply(Function f)
void
assign(Jama.Matrix b)
Set to given matrix (need to make sure both matrices are the same size)void
changed()
void
changed(java.lang.Object o)
void
copyFrom(double[][] src)
void
deleteObserver(java.util.Observer o)
void
dispose()
boolean
equals(java.util.Observable o)
Agent
getAgent()
Vec
getColumn(int k)
static Vec
getDiagonal(Jama.Matrix A)
Node
getNode()
Vec
getRow(int k)
int
height()
void
identity()
Set to identity matrixstatic Jama.Matrix
identity(Jama.Matrix a)
void
load(java.io.InputStream in)
double
logdet()
return log(abs(det(this))) (must be square matrix)java.util.Observable
observable()
void
read(java.io.Reader rdr)
void
save(java.io.OutputStream out)
void
set(Generator g)
void
symmetrise()
Symmetrise in place preserving trace.java.lang.String
toString()
Viewable
viewable()
int
width()
void
write(java.io.Writer wr)
void
zero()
Set to zero matrix
-
-
-
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()
-
getAgent
public Agent getAgent()
-
set
public void set(Generator g)
-
apply
public void apply(Function f)
-
add
public void add(Generator g)
-
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)
-
-