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

◆ validate_multi_channel_data()

template<ComputeData InputType = Kakshya::DataVariant, ComputeData OutputType = InputType>
bool MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >::validate_multi_channel_data ( const std::vector< std::span< double > > &  channels) const
inlineprivate

Validates multi-channel numeric data for NaN/Infinity values.

Parameters
channelsVector of spans representing each channel's data
Returns
true if all channels are valid, false if any contain invalid values

Checks each channel's samples to ensure they are finite numbers. Empty channels are considered valid.

Definition at line 676 of file UniversalTransformer.hpp.

677 {
678 if (channels.empty()) {
679 return false;
680 }
681
682 for (const auto& channel : channels) {
683 if (channel.empty()) {
684 continue;
685 }
686
687 for (double sample : channel) {
688 if (std::isnan(sample)) {
689 return false;
690 }
691 if (std::isinf(sample)) {
692 return false;
693 }
694 }
695 }
696
697 return true;
698 }