Skip to contents

The atoms that ConvexMOI() lowers to cones, as in ConvexOptimization.jl and SymbolicAnalysis.jl: eigmax(X) and eigmin(X) (the extreme eigenvalues of a symmetric matrix, lowered to a positive semidefinite cone), opnorm(X) (the spectral norm, norm(X, "2")), logdet(X) (the log determinant, a log determinant cone) and quad_form(x, P) (x' P x for a constant positive semidefinite P, a rotated second order cone). On numbers they compute the value; on the traced variables of a convex problem they return the atom. A symbolic matrix is a list matrix of expressions, such as matrix(c(u[1], 0, 0, 1 - u[1]), 2).

Usage

eigmax(X)

eigmin(X)

opnorm(X)

logdet(X)

quad_form(x, P)

Arguments

X

A numeric or symbolic matrix.

x

A numeric or symbolic vector.

P

A numeric matrix.

Value

A number, or the traced atom.

Examples

eigmax(matrix(c(2, 1, 1, 2), 2))
#> [1] 3
quad_form(c(1, 2), diag(2))
#> [1] 5
prob <- ConvexOptimizationProblem(function(u, p) eigmax(matrix(c(u[1], 0, 0, 1 - u[1]), 2)), 0)
solve(prob, ConvexMOI())$u
#> [1] 0.5