26 #ifndef CASADI_SUBMATRIX_HPP
27 #define CASADI_SUBMATRIX_HPP
37 template<
typename M,
typename I,
typename J>
48 SubMatrix(M& mat,
const I& i,
const J& j) : mat_(mat), i_(i), j_(j) {
49 mat.get(*
this,
false, i, j);
58 mat_.set(y,
false, i_, j_);
63 mat_.set(y,
false, i_, j_);
69 mat_.set(s,
false, i_, j_);
75 mat_.set(s,
false, i_, j_);
81 mat_.set(s,
false, i_, j_);
87 mat_.set(s,
false, i_, j_);
98 template<
typename M,
typename I>
109 mat.get(*
this,
false, i);
118 mat_.set(y,
false, i_);
123 mat_.set(y,
false, i_);
129 mat_.set(s,
false, i_);
135 mat_.set(s,
false, i_);
141 mat_.set(s,
false, i_);
147 mat_.set(s,
false, i_);
const M & operator=(const M &y)
SubIndex(const SubIndex< M, I > &y)=default
Default copy constructor.
const M & operator=(const SubIndex< M, I > &y)
SubIndex(M &mat, const I &i)
Constructor.
const M & operator=(const SubMatrix< M, I, J > &y)
SubMatrix(const SubMatrix< M, I, J > &y)=default
Default copy constructor.
const M & operator=(const M &y)
SubMatrix(M &mat, const I &i, const J &j)
Constructor.