| 27 | } // namespace |
| 28 | |
| 29 | class DeepSamplerSource : public SamplerSource { |
| 30 | private: |
| 31 | const DeepData& deep_data_; |
| 32 | |
| 33 | public: |
| 34 | explicit DeepSamplerSource(const DeepData* deep_data) |
| 35 | : deep_data_(*deep_data) {} |
| 36 | ~DeepSamplerSource() override = default; |
| 37 | |
| 38 | public: |
| 39 | int ns_size() const noexcept override { return deep_data_.ns_size(); } |
| 40 | const id_name_t& id_name_map() const noexcept override { |
| 41 | return deep_data_.id_name_map(); |
| 42 | } |
| 43 | const std::vector<vec_int_t>& nodes_list() const noexcept override { |
| 44 | return deep_data_.nodes_list(); |
| 45 | } |
| 46 | const std::vector<vec_float_t>& freqs_list() const noexcept override { |
| 47 | return deep_data_.freqs_list(); |
| 48 | } |
| 49 | const vec_int_t& node_keys() const noexcept override { |
| 50 | DXERROR("Node_keys was not implemented in DeepSamplerSource."); |
| 51 | return EMPTY_NODE_KEYS; |
| 52 | } |
| 53 | const vec_pair_t* FindContext(int_t /*node*/) const override { |
| 54 | DXERROR("Find_context was not implemented in DeepSamplerSource."); |
| 55 | return nullptr; |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | std::unique_ptr<SamplerSource> NewDeepSamplerSource(const DeepData* deep_data) { |
| 60 | std::unique_ptr<SamplerSource> sampler_source( |
nothing calls this directly
no outgoing calls
no test coverage detected