/** * Constructs a matrix with a given number of slices, rows and columns. All * entries are initially <tt>0</tt>. * * @param slices * the number of slices the matrix shall have. * @param rows * the number of rows the matrix shall have. * @param columns * the number of columns the matrix shall have. * @throws IllegalArgumentException * if <tt>(double)slices*columns*rows > Integer.MAX_VALUE</tt>. * @throws IllegalArgumentException * if <tt>slices<0 || rows<0 || columns<0</tt>. */ public DenseDoubleMatrix3D(int slices, int rows, int columns) { setUp(slices, rows, columns); this.elements = new double[slices * rows * columns]; }
/** * Constructs a matrix with a given number of slices, rows and columns. All * entries are initially <tt>0</tt>. * * @param slices * the number of slices the matrix shall have. * @param rows * the number of rows the matrix shall have. * @param columns * the number of columns the matrix shall have. * @throws IllegalArgumentException * if <tt>(double)slices*columns*rows > Integer.MAX_VALUE</tt>. * @throws IllegalArgumentException * if <tt>slices<0 || rows<0 || columns<0</tt>. */ public DenseDoubleMatrix3D(int slices, int rows, int columns) { setUp(slices, rows, columns); this.elements = new double[slices * rows * columns]; }
setUp(slices, rows, columns, sliceZero, rowZero, columnZero, sliceStride, rowStride, columnStride); this.elements = elements; this.isNoView = !isView;
setUp(slices, rows, columns, sliceZero, rowZero, columnZero, sliceStride, rowStride, columnStride); this.elements = elements; this.isNoView = !isView;