20template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
21 requires (R == -1 || C == -1)
33template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
34 requires (!IsVectorOrRow<R,C>)
37 Base::template _init2<int,int>(r,c);
38 if constexpr(!IsIntervalDomain<Scalar>)
58template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
59 requires (!IsVectorOrRow<R,C>)
60explicit Matrix(
int r,
int c,
const Scalar values[])
63 assert((R==(
int)r || R==-1) && (C==(
int)c || C==-1));
64 assert(r >= 0 && c >= 0);
72 for(Index i = 0 ; i < this->rows() ; i++)
73 for(Index j = 0 ; j < this->cols() ; j++)
74 (*
this)(i,j) = values[k++];
75 assert(k == this->size());
86template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
87 requires (!IsVectorOrRow<R,C>)
90 assert_release(r >= 0 && c >= 0);
91 return DenseBase<Matrix<Scalar,R,C>>::Zero(r,c);
101template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
102 requires (!IsVectorOrRow<R,C>)
105 assert_release(r >= 0 && c >= 0);
106 return DenseBase<Matrix<Scalar,R,C>>::Ones(r,c);
116template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
117 requires (!IsVectorOrRow<R,C>)
120 assert_release(r >= 0 && c >= 0);
121 return MatrixBase<Matrix<Scalar,R,C>>::Identity(r,c);
132template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
133 requires (!IsVectorOrRow<R,C>)
136 assert_release(r >= 0 && c >= 0);
137 return DenseBase<Matrix<Scalar,R,C>>::Constant(r,c,x);
149template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
150 requires (!IsVectorOrRow<R,C>)
153 assert_release(r >= 0 && c >= 0);
154 return DenseBase<Matrix<Scalar,R,C>>::Random(r,c);
168template<
int R=RowsAtCompileTime,
int C=ColsAtCompileTime>
169 requires (!IsVectorOrRow<R,C>)
175 for(Index i = 0 ; i < std::min((Index)copy.rows(),r) ; i++)
176 for(Index j = 0 ; j < std::min((Index)copy.cols(),c) ; j++)
177 (*
this)(i,j) = copy(i,j);
Matrix(const Matrix< double, R, C > &lb, const Matrix< double, R, C > &ub)
Constructs an interval matrix from lower and upper bound matrices.
Definition codac2_Matrix_addons_IntervalMatrixBase.h:50
auto & init()
Initializes all elements of the matrix with default intervals.
Definition codac2_Matrix_addons_IntervalMatrixBase.h:113
Matrix()=delete
Deleted default constructor to prevent default instantiation when either the number of rows or column...
void resize_save_values(Index r, Index c)
Resizes the matrix to (r,c), preserving existing values where possible.
Definition codac2_Matrix_addons_MatrixBase.h:170