// Copyright (C) 2016-2018 ERGO-Code
// Copyright (C) 2022-2023 Richard Lincoln
use cratelu;
use crateLU;
use crateStatus;
/// Given the factorization computed by [`factorize()`](crate::factorize()) or
/// [`update()`](crate::update()) and the dense right-hand side, `rhs`, solve a linear
/// system for the solution `lhs`.
///
/// ## Arguments
///
/// On return `lhs` holds the solution to the linear system. Uninitialized on entry.
/// `lhs` and `rhs` are allowed to overlap. To overwrite `rhs` with the solution
/// pass references to the same array.
///
/// `trans` defines which system to solve. `'t'` or `'T'` for the transposed system, any
/// other character for the forward system.
///
/// ## Returns
///
/// [`Status::ErrorInvalidCall`] if the factorization is invalid.