#pragma once

#include <cstddef>
#include <vector>

namespace fesa {

// Owns a contiguous dense vector while keeping the MKL backend private.
class Vector {
public:
    explicit Vector(std::size_t size, double value = 0.0);
    Vector(const Vector& other);
    Vector(Vector&& other) noexcept;
    Vector& operator=(const Vector& other);
    Vector& operator=(Vector&& other) noexcept;

    std::size_t size() const noexcept;
    double* data() noexcept;
    const double* data() const noexcept;
    double& operator[](std::size_t index);
    const double& operator[](std::size_t index) const;
    double dot(const Vector& rhs) const;
    double norm() const;
    void scale(double alpha);
    void axpy(double alpha, const Vector& x);

private:
    std::vector<double> values_;
};

} // namespace fesa
