3 #include "combined/model/member.h" 5 #include "waveguide/simulation_parameters.h" 7 #include "hrtf/multiband.h" 9 #include "cereal/types/base_class.hpp" 18 double usable_portion = 0.6);
20 void set_cutoff(
double cutoff);
21 void set_usable_portion(
double usable);
25 template <
typename Archive>
26 void serialize(Archive& archive) {
34 swap(data_, other.data_);
50 double usable_portion = 0.6);
52 void set_bands(
size_t bands);
53 void set_cutoff(
double cutoff);
54 void set_usable_portion(
double usable);
58 template <
typename Archive>
59 void serialize(Archive& archive) {
60 archive(data_.bands, data_.cutoff, data_.usable_portion);
67 swap(data_, other.data_);
72 void maintain_valid_cutoff();
85 single_band_waveguide,
86 multiple_band_waveguide> {
88 enum class mode { single, multiple };
91 mode mode = mode::single,
98 void set_mode(mode mode);
99 mode get_mode()
const;
101 template <
typename Archive>
102 void serialize(Archive& archive) {
103 archive(cereal::base_class<base_type>(
this), mode_);
109 const auto& single_band()
const {
return get<0>(); }
110 auto& single_band() {
return get<0>(); }
112 const auto& multiple_band()
const {
return get<1>(); }
113 auto& multiple_band() {
return get<1>(); }
115 NOTIFYING_COPY_ASSIGN_DECLARATION(waveguide)
117 inline void swap(waveguide& other) noexcept {
119 swap(mode_, other.mode_);
122 mode mode_ = mode::single;
Definition: waveguide.h:84
double usable_portion
Definition: simulation_parameters.h:15
Definition: waveguide.h:15
Definition: simulation_parameters.h:9
double cutoff
The actual cutoff of the waveguide mesh in Hz.
Definition: simulation_parameters.h:11
Definition: capsule_base.h:9
Definition: simulation_parameters.h:32
Definition: waveguide.h:45