Learn R Programming

ROI (version 0.2-1)

as.Q_term: Coerce an object to type "Q_term".

Description

The "Q_term" object represents the quadratic term of the "Q_constraint". Objects from the following classes can be coerced to "Q_term": "NULL", "numeric", "matrix", "simple_triplet_matrix" and "list".

Usage

as.Q_term(x, ...)
"as.Q_term"(x, ...)
"as.Q_term"(x, ...)
"as.Q_term"(x, ...)
"as.Q_term"(x, ...)
"as.Q_term"(x, ...)

Arguments

x
an R object.
...
further arguments

Value

an object of class "simple_triplet_zero_matrix"

Details

In the case of lists "as.Q_term" is applied to every element of the list, for NULL one can supply the optional arguments "nrow" and "ncol" which will create a "simple_triplet_zero_matrix" with the specified dimension.