|
EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
|
Represents an ITask for downsampling a Signal time-series data by a fixed factor. More...
#include <DownsampleTask.hpp>
Public Member Functions | |
| DownsampleTask (std::shared_ptr< Signal > signal, float factor=downsampling_factor) | |
| Creates a new downsampling job for the given Signal. | |
| DownsampleTask (const DownsampleTask &)=delete | |
| DownsampleTask & | operator= (const DownsampleTask &)=delete |
| Public Member Functions inherited from echomap::ITask | |
| ITask (const std::string_view task_name) | |
| virtual | ~ITask () noexcept=default |
| Destruct the ITask base. | |
| WorkerResult | execute (const std::stop_token &stop_token) |
| Execute the work, subject to the given token, and produce a WorkerResult. | |
| WorkerResult | operator() () |
| Alias for execute with a vacuous stop token. | |
| Public Member Functions inherited from echomap::Object< ITask > | |
| ~Object ()=default | |
| Non-virtual base destructor. | |
| id_type | get_id () const noexcept |
| bool | is_valid () const noexcept |
| void | set_name (const std::string_view new_name) |
| std::string_view | get_name () const noexcept |
| const char * | get_imgui_name () const noexcept |
| Object (const Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| bool | operator== (const Object &other) const noexcept |
| Determine shallow equality between two Object instances. | |
Private Member Functions | |
| WorkerResult | execute_work () override |
| Execute the work and produce a WorkerResult. | |
Private Attributes | |
| std::shared_ptr< Signal > | signal |
| const float | factor |
Static Private Attributes | |
| static constexpr float | downsampling_factor = 50.0f |
Additional Inherited Members | |
| Static Public Member Functions inherited from echomap::Object< ITask > | |
| static std::string_view | get_class_name () noexcept |
| Protected Member Functions inherited from echomap::Object< ITask > | |
| void | move_identity_from (Object &&other) noexcept |
| Helper for derived classes to provide move-assignment operations. | |
Represents an ITask for downsampling a Signal time-series data by a fixed factor.
Definition at line 27 of file DownsampleTask.hpp.
|
explicit |
Creates a new downsampling job for the given Signal.
Given the immutable nature of Signal Sample data, it is assumed that the time-series data will not be modified during the scheduling and execution of the job. Shared ownership is required to preserve lifetimes across the master and computation threads.
| signal | The shared-ownership Signal to downsample. |
| factor | The multiplicative factor by which the Signal should be downsampled. |
Definition at line 20 of file DownsampleTask.cpp.
|
overrideprivatevirtual |
Execute the work and produce a WorkerResult.
Implements echomap::ITask.
Definition at line 33 of file DownsampleTask.cpp.
|
staticconstexprprivate |
Definition at line 29 of file DownsampleTask.hpp.
|
private |
Definition at line 60 of file DownsampleTask.hpp.
|
private |
Definition at line 59 of file DownsampleTask.hpp.