/** * Sets up the ILU preconditioner * * @param n * Problem size (number of rows) */ public DoubleILU(int n) { this.n = n; y = new DenseDoubleMatrix1D(n); }
/** * Sets up the ICC preconditioner * * @param n * Problem size (number of rows) */ public DoubleICC(int n) { this.n = n; y = new DenseDoubleMatrix1D(n); }
public void initialize() { disp = new DenseDoubleMatrix1D(2); distance = 0; visited = false; }
/** * Sets up the ILU preconditioner * * @param n * Problem size (number of rows) */ public DoubleILU(int n) { this.n = n; y = new DenseDoubleMatrix1D(n); }
/** * Sets up the ICC preconditioner * * @param n * Problem size (number of rows) */ public DoubleICC(int n) { this.n = n; y = new DenseDoubleMatrix1D(n); }
public DoubleMatrix1D like1D(int size) { return new DenseDoubleMatrix1D(size); } }
public DoubleMatrix1D like1D(int size) { return new DenseDoubleMatrix1D(size); } }
public DoubleMatrix1D like1D(int size) { return new DenseDoubleMatrix1D(size); }
public DoubleMatrix1D like1D(int size) { return new DenseDoubleMatrix1D(size); }
protected DoubleMatrix1D like1D(int size, int zero, int stride) { return new DenseDoubleMatrix1D(size, this.elements, zero, stride, true); }
protected DoubleMatrix1D like1D(int size, int zero, int stride) { return new DenseDoubleMatrix1D(size, this.elements, zero, stride, true); }
/** * Constructs a matrix with the given shape, each cell initialized with * zero. */ public DoubleMatrix1D make(int size) { if (this == sparse) return new SparseDoubleMatrix1D(size); return new DenseDoubleMatrix1D(size); }
/** * Constructs a matrix with the given shape, each cell initialized with * zero. */ public DoubleMatrix1D make(int size) { if (this == sparse) return new SparseDoubleMatrix1D(size); return new DenseDoubleMatrix1D(size); }
/** * Constructs a matrix with the given cell values. The values are copied. So * subsequent changes in <tt>values</tt> are not reflected in the matrix, * and vice-versa. * * @param values * The values to be filled into the new matrix. */ public DoubleMatrix1D make(double[] values) { if (this == sparse) return new SparseDoubleMatrix1D(values); else return new DenseDoubleMatrix1D(values); }
public DoubleMatrix1D vectorize() { DoubleMatrix1D v = new DenseDoubleMatrix1D(rows * columns); int idx = 0; for (int c = 0; c < columns; c++) { for (int r = 0; r < rows; r++) { v.setQuick(idx++, getQuick(r, c)); } } return v; }
public DoubleMatrix1D vectorize() { DoubleMatrix1D v = new DenseDoubleMatrix1D(rows * columns); int idx = 0; for (int c = 0; c < columns; c++) { for (int r = 0; r < rows; r++) { v.setQuick(idx++, getQuick(r, c)); } } return v; }
public DoubleMatrix1D vectorize() { DoubleMatrix1D v = new DenseDoubleMatrix1D((int) size()); int length = rows * columns; for (int s = 0; s < slices; s++) { v.viewPart(s * length, length).assign(viewSlice(s).vectorize()); } return v; }
public DoubleMatrix1D vectorize() { DoubleMatrix1D v = new DenseDoubleMatrix1D((int) size()); int length = rows * columns; for (int s = 0; s < slices; s++) { v.viewPart(s * length, length).assign(viewSlice(s).vectorize()); } return v; }
public DoubleMatrix1D vectorize() { DoubleMatrix1D v = new DenseDoubleMatrix1D((int) size()); int length = rows * columns; for (int s = 0; s < slices; s++) { v.viewPart(s * length, length).assign(viewSlice(s).vectorize()); } return v; }
public DoubleMatrix1D vectorize() { DoubleMatrix1D v = new DenseDoubleMatrix1D((int) size()); int length = rows * columns; for (int s = 0; s < slices; s++) { v.viewPart(s * length, length).assign(viewSlice(s).vectorize()); } return v; }