Skip to content
Joris Gillis edited this page Apr 4, 2023 · 4 revisions

Standard documentation for diagsplit:

 split diagonally, retaining fixed-sized matrices

::

 diagsplit(Sparsity x, int incr) -> [Sparsity]
 diagsplit(DM x, int incr) -> [DM]
 diagsplit(SX x, int incr) -> [SX]
 diagsplit(MX x, int incr) -> [MX]
 diagsplit(Sparsity x, [int] output_offset) -> [Sparsity]
 diagsplit(DM x, [int] output_offset) -> [DM]
 diagsplit(SX x, [int] output_offset) -> [SX]
 diagsplit(MX x, [int] output_offset) -> [MX]
 diagsplit(Sparsity x, int incr1, int incr2) -> [Sparsity]
 diagsplit(Sparsity x, [int] output_offset1, [int] output_offset2) -> [Sparsity]
 diagsplit(DM x, int incr1, int incr2) -> [DM]
 diagsplit(DM x, [int] output_offset1, [int] output_offset2) -> [DM]
 diagsplit(SX x, int incr1, int incr2) -> [SX]
 diagsplit(SX x, [int] output_offset1, [int] output_offset2) -> [SX]
 diagsplit(MX x, int incr1, int incr2) -> [MX]
 diagsplit(MX x, [int] output_offset1, [int] output_offset2) -> [MX]

Parameters:

incr1: Row dimension of each matrix

incr2: Column dimension of each matrix

diagsplit(diagsplit(x, ...)) = x

Extra doc: https://github.com/casadi/casadi/wiki/L_3t

Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity_interface.hpp#L287

Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity_interface.hpp#L287-L289

Extra documentation

To edit, see writing tips.

Clone this wiki locally