Learn R Programming

CVXR (version 0.99-7)

SemidefUpperTri-class: The SemidefUpperTri class.

Description

This class represents the upper triangular part of a positive semidefinite variable.

Usage

SemidefUpperTri(n, name = NA_character_)

# S4 method for SemidefUpperTri as.character(x)

# S4 method for SemidefUpperTri get_data(object)

# S4 method for SemidefUpperTri canonicalize(object)

# S4 method for SymmetricUpperTri canonicalize(object)

Arguments

n

The number of rows/columns in the matrix.

name

(Optional) A character string representing the name of the variable.

x, object

A '>SemidefUpperTri object.

Methods (by generic)

  • get_data: Returns list(n, name).

  • canonicalize: Enforce that the variable be positive semidefinite.

  • canonicalize: Enforce that the variable be symmetric.

Slots

id

(Internal) A unique identification number used internally.

n

The number of rows/columns in the matrix.

rows

The number of rows in the variable.

cols

The number of columns in the variable.

name

(Optional) A character string representing the name of the variable.

primal_value

(Internal) The primal value of the variable stored internally.

Examples

Run this code
# NOT RUN {
x <- SemidefUpperTri(3)
as.character(x)
get_data(x)
canonicalize(x)
# }

Run the code above in your browser using DataLab