/** * Constructs a matrix with a copy of the given values. * <tt>values</tt> is required to have the form <tt>values[slice][row][column]</tt> * and have exactly the same number of rows in in every slice and exactly the same number of columns in in every row. * <p> * 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. * @throws IllegalArgumentException if <tt>for any 1 <= slice < values.length: values[slice].length != values[slice-1].length</tt>. * @throws IllegalArgumentException if <tt>for any 1 <= row < values[0].length: values[slice][row].length != values[slice][row-1].length</tt>. */ public DenseObjectMatrix3D(Object[][][] values) { this(values.length, (values.length==0 ? 0: values[0].length), (values.length==0 ? 0: values[0].length==0 ? 0 : values[0][0].length)); assign(values); } /**
/** * Constructs a matrix with a copy of the given values. * <tt>values</tt> is required to have the form <tt>values[slice][row][column]</tt> * and have exactly the same number of rows in in every slice and exactly the same number of columns in in every row. * <p> * 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. * @throws IllegalArgumentException if <tt>for any 1 <= slice < values.length: values[slice].length != values[slice-1].length</tt>. * @throws IllegalArgumentException if <tt>for any 1 <= row < values[0].length: values[slice][row].length != values[slice][row-1].length</tt>. */ public DenseObjectMatrix3D(Object[][][] values) { this(values.length, (values.length==0 ? 0: values[0].length), (values.length==0 ? 0: values[0].length==0 ? 0 : values[0][0].length)); assign(values); } /**