Program Listing for File SpecsynLibWD.hpp
↰ Return to documentation for file (src/specsyn/SpecsynLibWD.hpp)
#ifndef SPECSYNLIBWD_HPP
#define SPECSYNLIBWD_HPP
#include "../io/SimControls.hpp"
#include "Specsyn.hpp"
#include "SpecsynCommons.hpp"
#include "SpecsynLib2D.hpp"
#include <cstddef>
#include <string>
#include <vector>
namespace specsyn
{
template <OOBPolicy Policy>
class SpecsynLibWD : public SpecsynLib2D<Policy>
{
public:
SpecsynLibWD(
const std::string& spectraName,
const std::string& registryName,
double wlMin,
double wlMax,
std::size_t nWl,
const io::SimControls& controls);
[[nodiscard]] auto spec(const Specsyn::StarData& props, double feh) const
-> std::vector<double> override;
[[nodiscard]] auto specForce(const Specsyn::StarData& props, double feh) const
-> std::vector<double> override;
[[nodiscard]] auto logTeff() const -> const std::vector<double>& { return logTeff_; }
[[nodiscard]] auto logg() const -> const std::vector<double>& { return logg_; }
[[nodiscard]] auto loggMin() const -> double override { return logg_.front(); }
[[nodiscard]] auto loggMax() const -> double override { return logg_.back(); }
private:
// References into the parent class's dim2_/dim3_, named for
// what they actually hold in this (logg, Teff) specialization
// -- mirrors SpecsynLibNoWind's identical FeH_/logg_/logTeff_
// aliasing exactly, including the same rationale (deliberately
// references rather than owned copies: the actual storage
// lives in, and is sized by, the parent).
std::vector<double>& logg_; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
std::vector<double>& logTeff_; // NOLINT(readability-identifier-naming, cppcoreguidelines-avoid-const-or-ref-data-members)
};
} // namespace specsyn
#endif // SPECSYNLIBWD_HPP