MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ transform_time_reverse() [1/2]

template<OperationReadyData DataType>
DataType MayaFlux::Yantra::transform_time_reverse ( DataType &  input)

Time reversal transformation using C++20 ranges (IN-PLACE)

Template Parameters
DataTypeOperationReadyData type
Parameters
inputInput data - WILL BE MODIFIED
Returns
Time-reversed data (same as input, modified in-place)

Definition at line 62 of file TemporalHelper.hpp.

63{
64 auto [target_data, structure_info] = OperationHelper::extract_structured_double(input);
65
66 for (auto& span : target_data) {
67 std::ranges::reverse(span);
68 }
69
70 auto reconstructed_data = target_data
71 | std::views::transform([](const auto& span) {
72 return std::vector<double>(span.begin(), span.end());
73 })
74 | std::ranges::to<std::vector>();
75
76 return OperationHelper::reconstruct_from_double<DataType>(reconstructed_data, structure_info);
77}

References MayaFlux::Yantra::OperationHelper::extract_structured_double().

Referenced by MayaFlux::Yantra::TemporalTransformer< InputType, OutputType >::transform_implementation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: