quadratic_expression {RcppFastAD}R Documentation

Compute the value and derivate of a quadratic expression X' * Sigma * X

Description

Compute the value and derivate of a quadratic expression X' * Sigma * X

Usage

quadratic_expression(X, Sigma)

Arguments

X

A 2 element vector

Sigma

A 2 x 2 matrix

Value

A list with two elements for the expression evaluated for X and Sigma as well as

Examples

X <- c(0.5, 0.6)
S <- matrix(c(2, 3, 3, 6), 2, 2)
quadratic_expression(X, S)

[Package RcppFastAD version 0.0.2 Index]