| linear_operator | R Documentation |
Create a block-native linear operator.
linear_operator(
dim,
apply,
apply_adjoint = NULL,
dtype = "double",
structure = general(),
name = NULL,
metadata = list()
)
dim |
Integer vector of length two giving row and column dimensions. |
apply |
Function implementing block multiplication by the operator. |
apply_adjoint |
Optional function implementing block multiplication by the adjoint operator. |
dtype |
Scalar character type label, currently |
structure |
Eigencore structure descriptor such as |
name |
Optional operator label used in plans and diagnostics. |
metadata |
Optional list of implementation metadata. |
An eigencore_operator list containing dimensions, apply callbacks,
scalar type, structure metadata, a display name, and implementation
metadata.
A <- diag(c(3, 2, 1))
op <- linear_operator(
dim = dim(A),
apply = function(X, alpha = 1, beta = 0, Y = NULL) {
Z <- alpha * (A %*% X)
if (is.null(Y) || beta == 0) Z else Z + beta * Y
},
structure = hermitian(),
metadata = list(frobenius_norm = sqrt(sum(A^2)))
)
fit <- eig_partial(op, k = 1, target = largest())
values(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.