package symjava.matrix; import java.util.Vector; import symjava.numeric.NumMatrix; import symjava.symbolic.Expr; import symjava.symbolic.TypeInfo; /** * Matrix of symbolic expressions. * * See @Matrix for symbolic matrix which is a single * symbol represents a matrix object * */ public class ExprMatrix extends Expr { /** * Row vectors */ Vector data = new Vector();; public ExprMatrix() { } public ExprMatrix(String name) { } public ExprMatrix(Expr[][] array) { for(Expr[] row : array) data.add(new ExprVector(row)); } public ExprMatrix(int[][] array) { for(int[] row : array) data.add(new ExprVector(row)); } public ExprMatrix(double[][] array) { for(double[] row : array) data.add(new ExprVector(row)); } public ExprMatrix(int m, int n) { data.setSize(m); for(int i=0; i 0) return data.get(0).dim(); return 0; } // \left[ {\begin{array}{ccccc} // 1 & 2 & 3 & 4 & 5\\ // 3 & 4 & 5 & 6 & 7\\ // \end{array} } \right] public String toString() { StringBuilder sb = new StringBuilder(); sb.append("\\left[ {\\begin{array}{"); for(int j=0; j