/* ## class DPacked ## ## This class holds the framework for a matrix stored in packed form. ## It contains all the necessary basic routines for matrices adjusted ## for its form. ## */ package edu.rice.linpack.Matrix.DMatrix; import edu.rice.linpack.LNumber.*; import edu.rice.linpack.Vector.*; import edu.rice.linpack.util.*; public abstract class DPacked extends DMatrix { protected int order; public abstract void factor() throws SingularMatrixException; public abstract LNumber condition() throws SingularMatrixException, WrongDataTypeException; public abstract LNumber condition(Vector Z) throws SingularMatrixException, WrongDataTypeException; public abstract void solve(Vector B, int J) throws WrongDataTypeException; public abstract void solve(Vector B) throws WrongDataTypeException; public abstract Vector determ(); public abstract void inverse(); public double getElem(int i) { return Mat[i][0]; } public double[] getColumn(int q) { return getColumn(0,q); } public int getOrder() { return order; } public static double[][] pack(double[][] f) { int k = 0; int n = f.length; double[][] R = new double[(n*(n+1))/2][1]; for(int j=0;j