#pragma once

#include "fesa/core/status.hpp"

namespace fesa {

class SparseMatrix;
class Vector;

// Separates reusable matrix factorization from right-hand-side substitution.
class LinearSolver {
public:
    virtual ~LinearSolver() = default;
    virtual Status factorize(const SparseMatrix& matrix) = 0;
    virtual Status solve(const Vector& rhs, Vector& solution) const = 0;
};

} // namespace fesa
