/** * Construct and returns a new empty matrix <i>of the same dynamic type</i> as the receiver, having the same size. * For example, if the receiver is an instance of type <tt>DenseObjectMatrix1D</tt> the new matrix must also be of type <tt>DenseObjectMatrix1D</tt>, * if the receiver is an instance of type <tt>SparseObjectMatrix1D</tt> the new matrix must also be of type <tt>SparseObjectMatrix1D</tt>, etc. * In general, the new matrix should have internal parametrization as similar as possible. * * @return a new empty matrix of the same dynamic type. */ public ObjectMatrix1D like() { return like(size); } /**
/** * Construct and returns a new empty matrix <i>of the same dynamic type</i> as the receiver, having the same size. * For example, if the receiver is an instance of type <tt>DenseObjectMatrix1D</tt> the new matrix must also be of type <tt>DenseObjectMatrix1D</tt>, * if the receiver is an instance of type <tt>SparseObjectMatrix1D</tt> the new matrix must also be of type <tt>SparseObjectMatrix1D</tt>, etc. * In general, the new matrix should have internal parametrization as similar as possible. * * @return a new empty matrix of the same dynamic type. */ public ObjectMatrix1D like() { return like(size); } /**
/** * 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 ObjectMatrix1D copy() { ObjectMatrix1D copy = like(); copy.assign(this); return copy; } /**
/** * 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 ObjectMatrix1D copy() { ObjectMatrix1D copy = like(); copy.assign(this); return copy; } /**