pub fn eigsh_generalized_enhanced<T>(
a_matrix: &SymCsrMatrix<T>,
b_matrix: &SymCsrMatrix<T>,
k: Option<usize>,
which: Option<&str>,
mode: Option<&str>,
sigma: Option<T>,
options: Option<LanczosOptions>,
) -> SparseResult<EigenResult<T>>where
T: Float + Debug + Copy + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + Sum + SimdUnifiedOps + SparseElement + PartialOrd + Send + Sync + 'static,Expand description
Enhanced generalized eigenvalue solver with additional features
This function provides an enhanced interface to generalized eigenvalue computation with additional transformation modes and options.
§Arguments
a_matrix- The A matrix (left-hand side)b_matrix- The B matrix (right-hand side)k- Number of eigenvalues to computewhich- Which eigenvalues to computemode- Transformation mode: “standard”, “buckling”, “cayley”sigma- Shift value for shift-invert modesoptions- Additional solver options
§Returns
Enhanced generalized eigenvalue computation result
§Examples
use scirs2_sparse::linalg::eigsh_generalized_enhanced;
use scirs2_sparse::sym_csr::SymCsrMatrix;
let a_data = vec![5.0, 1.0, 4.0];
let a_indptr = vec![0, 1, 3];
let a_indices = vec![0, 0, 1];
let amatrix = SymCsrMatrix::new(a_data, a_indptr, a_indices, (2, 2)).unwrap();
let b_data = vec![2.0, 0.5, 1.5];
let b_indptr = vec![0, 1, 3];
let b_indices = vec![0, 0, 1];
let bmatrix = SymCsrMatrix::new(b_data, b_indptr, b_indices, (2, 2)).unwrap();
let result = eigsh_generalized_enhanced(
&amatrix, &bmatrix, Some(2), None, Some("standard"), None, None
).unwrap();