intf_convert: Convert a value to a numeric matrix or sparse matrix

View source: R/019_interface_matrix_utilities.R

intf_convertR Documentation

Convert a value to a numeric matrix or sparse matrix

Description

Normalizes R values so the rest of CVXR can assume a consistent type. Scalars -> 1x1 matrix, vectors -> column matrix, logical -> numeric. Sparse matrices are kept sparse.

Usage

intf_convert(val)

Arguments

val

A numeric scalar, vector, matrix, or Matrix object

Value

A matrix or dgCMatrix


CVXR documentation built on March 6, 2026, 9:10 a.m.