public DoubleMatrix1D apply(DoubleMatrix1D b, DoubleMatrix1D x) { if (x == null) { x = b.like(); } return x.assign(b); }
public void run() { for (int r = firstRow; r < lastRow; r++) { AA.viewRow(r).assign(y); } } });
public void run() { for (int c = firstColumn; c < lastColumn; c++) { AA.viewColumn(c).assign(x, DoubleFunctions.mult); } } });
public DoubleMatrix1D apply(DoubleMatrix1D b, DoubleMatrix1D x) { if (x == null) { x = b.like(); } return x.assign(b); }
public DoubleMatrix1D transApply(DoubleMatrix1D b, DoubleMatrix1D x) { if (x == null) { x = b.like(); } return x.assign(b); }
/** * Constructs a matrix with uniformly distributed values in <tt>(0,1)</tt> * (exclusive). */ public DoubleMatrix1D random(int size) { return make(size).assign(cern.jet.math.tdouble.DoubleFunctions.random()); }
public void run() { for (int i = firstIdx; i < lastIdx; i++) { C.viewPart(i * size_y, size_y).assign(y, DoubleFunctions.multSecond(x.getQuick(i))); } } });
/** * C = A||B; Constructs a new matrix which is the concatenation of two other * matrices. Example: <tt>0 1</tt> append <tt>3 4</tt> --> <tt>0 1 3 4</tt>. */ public DoubleMatrix1D append(DoubleMatrix1D A, DoubleMatrix1D B) { // concatenate DoubleMatrix1D matrix = make((int) (A.size() + B.size())); matrix.viewPart(0, (int) A.size()).assign(A); matrix.viewPart((int) A.size(), (int) B.size()).assign(B); return matrix; }
public void dger(double alpha, DoubleMatrix1D x, DoubleMatrix1D y, DoubleMatrix2D A) { cern.jet.math.tdouble.DoublePlusMultSecond fun = cern.jet.math.tdouble.DoublePlusMultSecond.plusMult(0); int rows = A.rows(); for (int i = 0; i < rows; i++) { fun.multiplicator = alpha * x.getQuick(i); A.viewRow(i).assign(y, fun); } }
/** * C = A||B; Constructs a new matrix which is the concatenation of two other * matrices. Example: <tt>0 1</tt> append <tt>3 4</tt> --> <tt>0 1 3 4</tt>. */ public DoubleMatrix1D append(DoubleMatrix1D A, DoubleMatrix1D B) { // concatenate DoubleMatrix1D matrix = make((int) (A.size() + B.size())); matrix.viewPart(0, (int) A.size()).assign(A); matrix.viewPart((int) A.size(), (int) B.size()).assign(B); return matrix; }
public DoubleMatrix1D vectorize() { DoubleMatrix1D v = new SparseDoubleMatrix1D((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 void run() { double[] column; for (int c = firstCol; c < lastCol; c++) { column = (double[]) viewColumn(c).copy().elements(); dctColumns.forward(column, scale); viewColumn(c).assign(column); } } });
public void run() { double[] column; for (int c = firstCol; c < lastCol; c++) { column = (double[]) viewColumn(c).copy().elements(); dhtColumns.forward(column); viewColumn(c).assign(column); } } });
public void run() { double[] column; for (int c = firstColumn; c < lastColumn; c++) { column = (double[]) viewColumn(c).copy().elements(); dctColumns.inverse(column, scale); viewColumn(c).assign(column); } } });
public void run() { double[] column; for (int c = firstColumn; c < lastColumn; c++) { column = (double[]) viewColumn(c).copy().elements(); dhtColumns.inverse(column, scale); viewColumn(c).assign(column); } } });
public void run() { double[] column; for (int c = firstColumn; c < lastColumn; c++) { column = (double[]) viewColumn(c).copy().elements(); dstColumns.inverse(column, scale); viewColumn(c).assign(column); } } });
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; }