Nothing
#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/lin_ops/CVXcanon.R
#####
## R-SPECIFIC: C++ CVXcanon bridge (Rcpp wrapper)
##
## Direct `.Call` per ADR D_PERF.6. Each site names its generated equivalent in
## a `## wrapper:` comment: `.Call` is positional, matches nothing by name,
## honors no defaults, and Rcpp SILENTLY COERCES a wrong type into the right one
## -- an allocation and a copy, i.e. exactly the cost being avoided. Note the
## explicit `as.integer()` at every site that takes a count or an index, for
## that reason. `scripts/validate_rcpp_bridge.R` checks each comment against the
## registered signature.
CVXcanon.build_matrix <- function(constraints, id_to_col, var_length,
param_to_size = integer(0),
constr_offsets) {
## Returns a ProblemData accessor object.
## var_length: total number of variable columns (constants go at column var_length).
## param_to_size: named integer vector, param_id -> param_size (empty for non-DPP).
ptr <- NA
if (missing(constr_offsets)) {
## wrapper: .build_matrix_0(xp, v, var_length, param_to_size_v)
ptr <- .Call('_CVXR_build_matrix_0',
constraints$getXPtr(),
id_to_col,
as.integer(var_length),
param_to_size,
PACKAGE = 'CVXR')
} else {
## wrapper: .build_matrix_1(xp, v1, var_length, param_to_size_v, v2)
ptr <- .Call('_CVXR_build_matrix_1',
constraints$getXPtr(),
id_to_col,
as.integer(var_length),
param_to_size,
constr_offsets,
PACKAGE = 'CVXR')
}
## Set extraction to CONSTANT_ID (-1), vec_idx = 0 (non-DPP path)
## wrapper: .ProblemData__set_param_id(ptr, -1L)
.Call('_CVXR_ProblemData__set_param_id', ptr, -1L, PACKAGE = "CVXR")
## wrapper: .ProblemData__set_vec_idx(ptr, 0L)
.Call('_CVXR_ProblemData__set_vec_idx', ptr, 0L, PACKAGE = "CVXR")
getV <- function() {
## wrapper: .ProblemData__getV(ptr)
.Call('_CVXR_ProblemData__getV', ptr, PACKAGE = "CVXR")
}
getI <- function() {
## wrapper: .ProblemData__getI(ptr)
.Call('_CVXR_ProblemData__getI', ptr, PACKAGE = "CVXR")
}
getJ <- function() {
## wrapper: .ProblemData__getJ(ptr)
.Call('_CVXR_ProblemData__getJ', ptr, PACKAGE = "CVXR")
}
getParamIds <- function() {
## wrapper: .ProblemData__get_param_ids(ptr)
.Call('_CVXR_ProblemData__get_param_ids', ptr, PACKAGE = "CVXR")
}
getNumVecs <- function(pid) {
## wrapper: .ProblemData__get_num_vecs(ptr, as.integer(pid))
.Call('_CVXR_ProblemData__get_num_vecs', ptr, as.integer(pid), PACKAGE = "CVXR")
}
setParamId <- function(pid) {
## wrapper: .ProblemData__set_param_id(ptr, as.integer(pid))
.Call('_CVXR_ProblemData__set_param_id', ptr, as.integer(pid), PACKAGE = "CVXR")
}
setVecIdx <- function(idx) {
## wrapper: .ProblemData__set_vec_idx(ptr, as.integer(idx))
.Call('_CVXR_ProblemData__set_vec_idx', ptr, as.integer(idx), PACKAGE = "CVXR")
}
list(getV = getV, getI = getI, getJ = getJ,
getParamIds = getParamIds, getNumVecs = getNumVecs,
setParamId = setParamId, setVecIdx = setVecIdx)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.