Function osqp_sys::osqp_update_P_A [] [src]

pub unsafe extern "C" fn osqp_update_P_A(
    work: *mut OSQPWorkspace,
    Px_new: *mut osqp_float,
    Px_new_idx: *mut osqp_int,
    P_new_n: osqp_int,
    Ax_new: *mut osqp_float,
    Ax_new_idx: *mut osqp_int,
    A_new_n: osqp_int
) -> osqp_int

Update elements of matrix P (upper-diagonal) and elements of matrix A without changing sparsity structure.

If Px_new_idx is OSQP_NULL, Px_new is assumed to be as long as P->x and the whole P->x is replaced.

If Ax_new_idx is OSQP_NULL, Ax_new is assumed to be as long as A->x and the whole P->x is replaced.

@param work Workspace structure @param Px_new Vector of new elements in P->x (upper triangular) @param Px_new_idx Index mapping new elements to positions in P->x @param P_new_n Number of new elements to be changed @param Ax_new Vector of new elements in A->x @param Ax_new_idx Index mapping new elements to positions in A->x @param A_new_n Number of new elements to be changed @return output flag: 0: OK 1: P_new_n > nnzP 2: A_new_n > nnzA <0: error in the update