pub fn validate_rhs(
rhs: &[f32],
expected_len: usize,
) -> Result<(), ValidationError>Expand description
Validate a right-hand-side vector for a linear solve.
Checks:
rhs.len() == expected_len(dimension must match the matrix).- No
NaNorInfentries. - If all entries are zero, emits a
tracing::warn(a zero RHS is technically valid but often indicates a bug).
§Errors
Returns ValidationError on dimension mismatch or non-finite values.