JAL-2379 SparseMatrix alternative to Matrix, both MatrixI
[jalview.git] / src / jalview / math / MatrixI.java
1 package jalview.math;
2
3 import java.io.PrintStream;
4
5 public interface MatrixI
6 {
7   /**
8    * Answers the number of columns
9    * 
10    * @return
11    */
12   int width();
13
14   /**
15    * Answers the number of rows
16    * 
17    * @return
18    */
19   int height();
20
21   /**
22    * Answers the value at row i, column j
23    * 
24    * @param i
25    * @param j
26    * @return
27    */
28   double getValue(int i, int j);
29
30   /**
31    * Answers a copy of the values in the i'th row
32    * 
33    * @return
34    */
35   double[] getRow(int i);
36   
37   MatrixI copy();
38
39   MatrixI transpose();
40
41   MatrixI preMultiply(MatrixI m);
42
43   MatrixI postMultiply(MatrixI m);
44
45   double[] getD();
46
47   double[] getE();
48
49   void print(PrintStream ps, String format);
50
51   void printD(PrintStream ps, String format);
52
53   void printE(PrintStream ps, String format);
54
55   void tqli() throws Exception;
56
57   void tred();
58
59 }