MayaFlux 0.4.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 681 of file UniversalTransformer.hpp.

682 {
683 if (channels.empty()) {
684 return false;
685 }
686
687 for (const auto& channel : channels) {
688 if (channel.empty()) {
689 continue;
690 }
691
692 for (double sample : channel) {
693 if (std::isnan(sample)) {
694 return false;
695 }
696 if (std::isinf(sample)) {
697 return false;
698 }
699 }
700 }
701
702 return true;
703 }
uint32_t channel

References channel.