Skip to main content
`Ctrl`+`K`

# TaoTermCreateQuadratic

Create a `TAOTERMQUADRATIC` for a given matrix

## Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoTermCreateQuadratic(Mat A, TaoTerm *term)

Collective

## Input Parameter

- A - a square matrix

## Output Parameter

- term - a `TaoTerm` that implements \(\tfrac{1}{2}(x - p)^T A (x - p)\)

## See Also

TaoTerm: composable objective function terms, `TaoTerm`, `TaoTermCreate()`, `TAOTERMQUADRATIC`, `TaoTermCreateHalfL2Squared()`, `TaoTermCreateL1()`, `TaoTermQuadraticSetMat()`

## Level

beginner

## Location

src/tao/term/impls/quadratic/taotermquadratic.c

## Examples

src/tao/unconstrained/tutorials/elastic_net_regularization.c

Index of all TaoTerm routines
Table of Contents for all manual pages
Index of all manual pages