Learn R Programming

CVXR (version 1.0-14)

lambda_sum_largest: Sum of Largest Eigenvalues

Description

The sum of the largest \(k\) eigenvalues of a matrix.

Usage

lambda_sum_largest(A, k)

Value

An Expression representing the sum of the largest k eigenvalues of the input.

Arguments

A

An Expression or matrix.

k

The number of eigenvalues to sum over.

Examples

Run this code
C <- Variable(3,3)
val <- cbind(c(1,2,3), c(2,4,5), c(3,5,6))
prob <- Problem(Minimize(lambda_sum_largest(C,2)), list(C == val))
result <- solve(prob)
result$value
result$getValue(C)

Run the code above in your browser using DataLab