quadratic_expression {RcppFastAD} | R Documentation |
Compute the value and derivate of a quadratic expression X' * Sigma * X
quadratic_expression(X, Sigma)
X |
A 2 element vector |
Sigma |
A 2 x 2 matrix |
A list with two elements for the expression evaluated for X and Sigma as well as
X <- c(0.5, 0.6)
S <- matrix(c(2, 3, 3, 6), 2, 2)
quadratic_expression(X, S)