143 std::optional<char>
axis = std::nullopt;
169template <
typename Operation>
182 std::vector<TransformationKey>
keys;
222template <ComputeData InputType = Kakshya::DataVariant, ComputeData OutputType = InputType>
250 [[nodiscard]] std::string
get_name()
const override
275 if (
name ==
"strategy") {
276 auto strategy_result = safe_any_cast<TransformationStrategy>(
value);
277 if (strategy_result) {
281 auto str_result = safe_any_cast<std::string>(
value);
283 auto strategy_enum = Reflect::string_to_enum_case_insensitive<TransformationStrategy>(*str_result.value);
290 if (
name ==
"quality") {
291 auto quality_result = safe_any_cast<TransformationQuality>(
value);
292 if (quality_result) {
296 auto str_result = safe_any_cast<std::string>(
value);
298 auto quality_enum = Reflect::string_to_enum_case_insensitive<TransformationQuality>(*str_result.value);
305 if (
name ==
"scope") {
306 auto scope_result = safe_any_cast<TransformationScope>(
value);
311 auto str_result = safe_any_cast<std::string>(
value);
313 auto scope_enum = Reflect::string_to_enum_case_insensitive<TransformationScope>(*str_result.value);
333 if (
name ==
"strategy") {
336 if (
name ==
"quality") {
339 if (
name ==
"scope") {
475 template <ComputeData T>
479 auto val_result = safe_any_cast<T>(
a);
481 return func(*val_result);
574 return (it !=
m_parameters.end()) ? it->second : std::any {};
611 std::vector<double> parameters;
617 if (key.axis.has_value()) {
620 param = key.parameter_extractor(
input.data[key.channel]);
623 param = std::clamp(param, 0.0, 1.0);
625 parameters.push_back(param * key.intensity * key.weight);
627 parameters.push_back(0.0);
650 if (!
input.has_container()) {
680 result.
metadata[
"validation_failed"] =
true;
681 result.
metadata[
"fallback_reason"] =
"Input validation failed";
683 if constexpr (std::is_same_v<InputType, OutputType>) {
687 if (!
input.has_container()) {
688 result.
container = std::make_shared<Kakshya::SignalSourceContainer>();
713 for (
const auto& channel :
channels) {
714 if (channel.empty()) {
718 for (
double sample : channel) {
719 if (std::isnan(sample)) {
722 if (std::isinf(sample)) {
Core::GlobalInputConfig input
Base interface for all computational operations in the processing pipeline.
static std::span< double > extract_numeric_data(const T &compute_data)
extract numeric data from single-variant types
Types that need an associated SignalSourceContainer to extract data.
@ TEMPORAL
Time-based patterns, onset detection.
@ CUSTOM
User-defined analysis types.
@ SPATIAL
Multi-dimensional geometric analysis.
@ SPECTRAL
Spectral energy (FFT-based)
@ RECURSIVE
Recursive/nested extraction.
@ PATTERN_BASED
Extract based on pattern recognition.
@ CONVOLUTION
Convolution-based operations.
TransformationScope
Scope control for transformation operations.
@ SELECTIVE_BANDS
Transform specific frequency/spatial bands.
@ CONDITIONAL
Transform based on dynamic conditions.
@ FULL_DATA
Transform entire data set.
TransformationQuality
Quality vs performance trade-off control.
@ HIGH_QUALITY
High-quality transformation, may be slower.
@ DRAFT
Fast, low-quality transformation for previews.
@ ADAPTIVE
Quality adapts based on available computational resources.
@ STANDARD
Balanced quality/performance for real-time use.
@ REFERENCE
Maximum quality, computational cost is secondary.
OperationType
Operation categories for organization and discovery.
@ IN_PLACE
Sort data in-place (modifies input)
@ CROSS_MODAL
Sort one modality by features of another.
@ STANDARD
Traditional comparison-based sorting.
@ PARALLEL
Parallel with other operations.
TransformationType
Categories of transformation operations for discovery and organization.
@ GENERATIVE
AI/ML-driven or algorithmic generation-based transformations.
@ GRANULAR
Granular synthesis and micro-temporal transformations.
@ MATHEMATICAL
Mathematical transformations (polynomial mapping, matrix operations)
TransformationStrategy
Transformation execution strategies.
@ BUFFERED
Create transformed copy (preserves input)
@ LAZY
Lazy evaluation transformation (future: coroutines)
@ CHUNKED
Transform in chunks for efficient processing.
@ INCREMENTAL
Progressive transformation with intermediate results.
@ IN_PLACE
Transform data in-place (modifies input)
@ STREAMING
Stream-based transformation for large data.
@ FULL_DATA
Extract all available data.
@ TARGETED_REGIONS
Extract only specific regions.
T data
The actual computation data.
std::vector< Kakshya::DataDimension > dimensions
Data dimensional structure.
std::optional< std::shared_ptr< Kakshya::SignalSourceContainer > > container
Optional reference to container, required for regions.
Kakshya::DataModality modality
Data modality (audio, image, spectral, etc.)
std::unordered_map< std::string, std::any > metadata
Associated metadata.
Input/Output container for computation pipeline data flow with structure preservation.