// Copyright (C) 2026 Kiyotsugu Arai
// SPDX-License-Identifier: LGPL-3.0-or-later

// vector.cpp — explicit instantiation of Vector<T> (float, double)
//
// This causes the float/double Vector code to be compiled exactly once into sangi_matrix.lib,
// suppressing template re-instantiation in each TU.
// Paired with the extern template declarations on the header side.

// In this TU, disable extern template and generate the definitions here
#define SANGI_VECTOR_EXPLICIT_INSTANTIATION
#include <math/core/vector.hpp>

namespace sangi {

// ---------------------------------------------------------------------------
// Vector<T>
// ---------------------------------------------------------------------------
template class Vector<float>;
template class Vector<double>;

// ---------------------------------------------------------------------------
// free functions
// ---------------------------------------------------------------------------
template std::ostream& operator<<(std::ostream&, const Vector<float>&);
template std::ostream& operator<<(std::ostream&, const Vector<double>&);

template std::string toLatex(const Vector<float>&, const std::string&, std::size_t);
template std::string toLatex(const Vector<double>&, const std::string&, std::size_t);

} // namespace sangi
