/** * Constructs a matrix with the given shape, each cell initialized with the given value. */ public DoubleMatrix3D make(int slices, int rows, int columns, double initialValue) { return make(slices,rows,columns).assign(initialValue); } /**
/** * Constructs a matrix with the given shape, each cell initialized with the given value. */ public DoubleMatrix3D make(int slices, int rows, int columns, double initialValue) { return make(slices,rows,columns).assign(initialValue); } /**
/** * Constructs and returns a deep copy of the receiver. * <p> * <b>Note that the returned matrix is an independent deep copy.</b> * The returned matrix is not backed by this matrix, so changes in the returned matrix are not reflected in this matrix, and vice-versa. * * @return a deep copy of the receiver. */ public DoubleMatrix3D copy() { return like().assign(this); } /**
/** * Constructs and returns a deep copy of the receiver. * <p> * <b>Note that the returned matrix is an independent deep copy.</b> * The returned matrix is not backed by this matrix, so changes in the returned matrix are not reflected in this matrix, and vice-versa. * * @return a deep copy of the receiver. */ public DoubleMatrix3D copy() { return like().assign(this); } /**
/** * Sets all cells to the state specified by <tt>value</tt>. * @param value the value to be filled into the cells. * @return <tt>this</tt> (for convenience only). */ public DoubleMatrix3D assign(double value) { // overriden for performance only if (this.isNoView && value==0) this.elements.clear(); else super.assign(value); return this; } /**
/** * Sets all cells to the state specified by <tt>value</tt>. * @param value the value to be filled into the cells. * @return <tt>this</tt> (for convenience only). */ public DoubleMatrix3D assign(double value) { // overriden for performance only if (this.isNoView && value==0) this.elements.clear(); else super.assign(value); return this; } /**
/** * Constructs a matrix with uniformly distributed values in <tt>(0,1)</tt> (exclusive). */ public DoubleMatrix3D random(int slices, int rows, int columns) { return make(slices,rows,columns).assign(cern.jet.math.Functions.random()); } }
/** * Constructs a matrix with uniformly distributed values in <tt>(0,1)</tt> (exclusive). */ public DoubleMatrix3D random(int slices, int rows, int columns) { return make(slices,rows,columns).assign(cern.jet.math.Functions.random()); } }
super.assign(values);
/** * Constructs a matrix with cells having ascending values. * For debugging purposes. */ public DoubleMatrix3D ascending(int slices, int rows, int columns) { cern.jet.math.Functions F = cern.jet.math.Functions.functions; return descending(slices,rows,columns).assign(F.chain(F.neg,F.minus(slices*rows*columns))); } /**
super.assign(values);
/** * Constructs a matrix with cells having ascending values. * For debugging purposes. */ public DoubleMatrix3D ascending(int slices, int rows, int columns) { cern.jet.math.Functions F = cern.jet.math.Functions.functions; return descending(slices,rows,columns).assign(F.chain(F.neg,F.minus(slices*rows*columns))); } /**