Learn R Programming

sstvars (version 1.2.5)

bound_jsr_G_Cpp: Compute lower and upper bounds for the joint spectral radius using Gripenberg's branch-and-bound algorithm (C++ implementation).

Description

This internal function computes lower and upper bounds for the joint spectral radius (JSR) of a finite set of square matrices using a branch-and-bound algorithm of the type proposed by Gripenberg (1996).

Usage

bound_jsr_G_Cpp(S, epsilon = 0.01, maxit = 1000L, print_progress = TRUE)

Value

A numeric vector of length two containing the certified lower and upper bounds for the joint spectral radius, in the order c(lower_bound, upper_bound).

Arguments

S

an arma::cube of dimension \(n \times n \times m\) containing the set of \(m\) square matrices whose joint spectral radius is to be bounded.

epsilon

a positive scalar specifying the desired tolerance for the difference between the upper and lower bounds. The algorithm terminates once the upper bound minus the lower bound is less than or equal to epsilon.

maxit

An integer specifying the maximum number of iterations of the branch-and-bound algorithm.

print_progress

Logical; if TRUE, progress information (iteration number, current bounds, and number of candidate products) is printed to the console during execution.

Details

The implementation mirrors the logic of the corresponding R function bound_jsr_G, but performs the entire iteration process in C++ using Rcpp and RcppArmadillo for improved performance.

The algorithm iteratively constructs candidate matrix products, prunes them using norm-based upper bounds, and tightens the lower and upper bounds on the joint spectral radius until the desired tolerance is reached or a maximum number of iterations is exceeded.