Affine combinations and shape manipulations of expressions. These have constant (zero) second derivatives but participate in the Jacobian.
Arguments
- left, right, child, c
expression handles.
- d1, d2
target row and column dimensions (for
sd_promote,sd_reshape,sd_broadcast,sd_index).- indices
0-based column-major flat indices selected by
sd_index.- args
a list of expression handles to stack (
sd_hstack,sd_vstack).- n_vars
total number of variables in the problem.
- axis
reduction axis for
sd_sum:-1(all entries),0(down rows) or1(across columns).
Details
sd_addelementwise sum of two expressions.
sd_sumsum reduction along
axis.sd_tracematrix trace.
sd_transposematrix transpose.
sd_diag_vecdiagonal matrix from a vector.
sd_diag_matdiagonal vector from a matrix.
sd_upper_trithe strict upper-triangular entries.
sd_promotepromote a scalar to shape
d1 x d2.sd_reshapereshape to
d1 x d2(column-major).sd_broadcastbroadcast to
d1 x d2.sd_indexselect entries by 0-based flat
indices.sd_hstack,sd_vstackhorizontal / vertical stacking.
