sssp_project: Exact joint sparsity and group sparsity projection

View source: R/sssp.R

sssp_projectR Documentation

Exact joint sparsity and group sparsity projection

Description

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.

Usage

sssp_project(v, groups, r, s, verbose = FALSE)

Arguments

v

Numeric vector v \in \mathbb{R}^n.

groups

Group sizes or a list of 1-based index vectors encoding \mathcal{L}_1,\ldots,\mathcal{L}_p.

r

Group sparsity level r.

s

Sparsity level s.

verbose

If TRUE, print a citation-bearing result.

Value

A list with x, the projection, and info, including objective, tuple, selected_groups, n_tuples, and wall_time.

Examples

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

sssp documentation built on Sept. 5, 2026, 5:08 p.m.