List of all members | Public Member Functions
casadi::SubIndex< M, I > Class Template Reference

#include <submatrix.hpp>

Detailed Description

template<typename M, typename I>
class casadi::SubIndex< M, I >

SubIndex class for Matrix Same as the above class but for single argument return for operator()

Author
Joel Andersson
Date
2011-2014

Definition at line 99 of file submatrix.hpp.

Inheritance diagram for casadi::SubIndex< M, I >:
Inheritance graph
[legend]
Collaboration diagram for casadi::SubIndex< M, I >:
Collaboration graph
[legend]

Public Member Functions

 SubIndex (M &mat, const I &i)
 Constructor. More...
 
 SubIndex (const SubIndex< M, I > &y)=default
 Default copy constructor. More...
 
const M & operator= (const SubIndex< M, I > &y)
 
const M & operator= (const M &y)
 
operator+= (const M &y)
 
operator-= (const M &y)
 
operator*= (const M &y)
 
operator/= (const M &y)
 

Constructor & Destructor Documentation

◆ SubIndex() [1/2]

template<typename M , typename I >
casadi::SubIndex< M, I >::SubIndex ( M &  mat,
const I &  i 
)
inline

Definition at line 108 of file submatrix.hpp.

108  : mat_(mat), i_(i) {
109  mat.get(*this, false, i);
110  }

◆ SubIndex() [2/2]

template<typename M , typename I >
casadi::SubIndex< M, I >::SubIndex ( const SubIndex< M, I > &  y)
default

Member Function Documentation

◆ operator*=()

template<typename M , typename I >
M casadi::SubIndex< M, I >::operator*= ( const M &  y)
inline

Methods that modify a part of the parent object (A(i) = ?, A(i) += ?, etc.)

Definition at line 139 of file submatrix.hpp.

139  {
140  M s = *this*y;
141  mat_.set(s, false, i_);
142  return s;
143  }

◆ operator+=()

template<typename M , typename I >
M casadi::SubIndex< M, I >::operator+= ( const M &  y)
inline

Methods that modify a part of the parent object (A(i) = ?, A(i) += ?, etc.)

Definition at line 127 of file submatrix.hpp.

127  {
128  M s = *this+y;
129  mat_.set(s, false, i_);
130  return s;
131  }

◆ operator-=()

template<typename M , typename I >
M casadi::SubIndex< M, I >::operator-= ( const M &  y)
inline

Methods that modify a part of the parent object (A(i) = ?, A(i) += ?, etc.)

Definition at line 133 of file submatrix.hpp.

133  {
134  M s = *this-y;
135  mat_.set(s, false, i_);
136  return s;
137  }

◆ operator/=()

template<typename M , typename I >
M casadi::SubIndex< M, I >::operator/= ( const M &  y)
inline

Methods that modify a part of the parent object (A(i) = ?, A(i) += ?, etc.)

Definition at line 145 of file submatrix.hpp.

145  {
146  M s = *this/y;
147  mat_.set(s, false, i_);
148  return s;
149  }

◆ operator=() [1/2]

template<typename M , typename I >
const M& casadi::SubIndex< M, I >::operator= ( const M &  y)
inline

Methods that modify a part of the parent object (A(i) = ?, A(i) += ?, etc.)

Definition at line 122 of file submatrix.hpp.

122  {
123  mat_.set(y, false, i_);
124  return y;
125  }

◆ operator=() [2/2]

template<typename M , typename I >
const M& casadi::SubIndex< M, I >::operator= ( const SubIndex< M, I > &  y)
inline

Methods that modify a part of the parent object (A(i) = ?, A(i) += ?, etc.)

Definition at line 117 of file submatrix.hpp.

117  {
118  mat_.set(y, false, i_);
119  return y;
120  }

The documentation for this class was generated from the following file: