| sssp_project | R Documentation |
Computes an exact element of P_{G_r \cap C_s}(v). The argument
groups must form a disjoint union of all indices of v; R index
vectors are 1-based. A numeric vector groups is interpreted as
(|\mathcal{L}_1|,\ldots,|\mathcal{L}_p|) for contiguous groups.
sssp_project(v, groups, r, s, verbose = FALSE)
v |
Numeric vector |
groups |
Group sizes or a list of 1-based index vectors encoding
|
r |
Group sparsity level |
s |
Sparsity level |
verbose |
If |
A list with x, the projection, and info, including
objective, tuple, selected_groups, n_tuples, and
wall_time.
v <- c(10, -1, 2, 3, 9, 0, -4, -8, 7, 6)
res <- sssp_project(v, c(3, 4, 3), r = 3, s = 6)
res$x
res$info$tuple
## non-uniform groups given as index lists
v2 <- c(4, -3, 5, 2, -6, 1, 7, -8, 0.5, 9, -2, 3)
groups2 <- list(c(1, 4), c(2, 3, 5, 8, 9, 10), c(6, 7, 11, 12))
sssp_project(v2, groups2, r = 2, s = 5)$info$tuple
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.