Note that Python or Octave do not need to use this class. They can just use slicing utility from the host language ( M[0:6] in Python, M(1:7) )
Extra doc: https://github.com/casadi/casadi/wiki/L_13
Definition at line 47 of file slice.hpp.
|
| | Slice () |
| | Default constructor - all elements. More...
|
| |
| | Slice (casadi_int i, bool ind1=false) |
| | A single element (explicit to avoid ambiguity with IM overload. More...
|
| |
| | Slice (casadi_int start, casadi_int stop, casadi_int step=1) |
| | A slice. More...
|
| |
| | Slice (int start, int stop, int step=1) |
| |
| | Slice (int start, casadi_int stop, int step=1) |
| |
| | Slice (casadi_int start, int stop, int step=1) |
| |
| std::vector< casadi_int > | all () const |
| | Get a vector of indices. More...
|
| |
| std::vector< casadi_int > | all (casadi_int len, bool ind1=false) const |
| | Get a vector of indices. More...
|
| |
| std::vector< casadi_int > | all (const Slice &outer, casadi_int len) const |
| | Get a vector of indices (nested slice) More...
|
| |
| size_t | size () const |
| | Get number of elements. More...
|
| |
| bool | is_empty () const |
| | Check if slice is empty. More...
|
| |
| bool | is_scalar (casadi_int len) const |
| | Is the slice a scalar. More...
|
| |
| casadi_int | scalar (casadi_int len) const |
| | Get scalar (if is_scalar) More...
|
| |
| bool | operator== (const Slice &other) const |
| | Check equality. More...
|
| |
| bool | operator!= (const Slice &other) const |
| | Check inequality. More...
|
| |
| Slice | apply (casadi_int len, bool ind1=false) const |
| | Apply concrete length. More...
|
| |
| Slice | operator- (casadi_int i) const |
| | Substract. More...
|
| |
| Slice | operator* (casadi_int i) const |
| |
| std::string | type_name () const |
| | Get name of the class. More...
|
| |
| void | disp (std::ostream &stream, bool more=false) const |
| | Print a description of the object. More...
|
| |
| std::string | get_str (bool more=false) const |
| | Get string representation. More...
|
| |
| Dict | info () const |
| |
| void | serialize (SerializingStream &s) const |
| | Serialize an object. More...
|
| |