Skip to main content

Module validate

Module validate 

Source
Expand description

Validation helpers shared across backends and exec layers.

§Examples

use tenferro_tensor::validate::validate_nonsingular_u;
use tenferro_tensor::{Tensor, TypedTensor};

let t = Tensor::F64(TypedTensor::from_vec_col_major(vec![2, 2], vec![1.0, 0.0, 0.0, 1.0]).unwrap());
assert!(validate_nonsingular_u(&t).is_ok());

Traits§

DiagSingularity
Trait for detecting singular or non-finite diagonal entries.

Functions§

can_convert_dtype
Return whether public convert may change from into to.
check_singular_diagonal
Checks that every diagonal element of a (possibly batched) upper-triangular factor is non-singular and finite.
promote_dtype
Promote two dtypes according to tenferro’s public dtype-promotion lattice.
validate_convert_dtype
Validate a public checked dtype conversion.
validate_nonsingular_u
Validates that the upper-triangular factor u of a matrix decomposition has no singular (zero) or non-finite diagonal entries.