View source: R/025_interface_matrix_utilities.R
| intf_convert | R Documentation |
Normalizes R values so the rest of CVXR can assume a consistent type, as
CVXPY's Constant() does through const_to_matrix (constant.py:51-54;
numpy_interface/sparse_matrix_interface.py:40-51, ndarray_interface.py):
every sparse input becomes a double CSC matrix, bool and int are cast to
double, the shape is kept and explicit zeros are kept.
intf_convert(val)
val |
A logical, integer, double or complex scalar, vector or matrix, or a Matrix object |
Here any sparseMatrix or sparseVector becomes a general double
dgCMatrix (symmetric, triangular, diagonal, triplet, row-compressed,
pattern and logical classes included); a dense Matrix becomes a base
matrix; a base logical, integer, double or complex value is stored as
double (complex kept), a scalar or vector as a column.
A base matrix or a dgCMatrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.