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

◆ diagnose_interval_scan()

MAYAFLUX_API std::string MayaFlux::Kinesis::Discrete::diagnose_interval_scan ( const IntervalScanConfig & config)
nodiscard

Why a config cannot be scanned.

Returns
The reason, empty when the config is valid: thresholds finite, hop above 0, and max_run, when set, above hop plus twice the padding.

Definition at line 16 of file IntervalScan.cpp.

17{
18 if (!std::isfinite(config.enter) || !std::isfinite(config.leave) || !std::isfinite(config.gate_threshold)) {
19 return "Interval scan thresholds must be finite";
20 }
21 if (config.hop == 0) {
22 return "Interval scan hop must be greater than 0";
23 }
24 if (config.max_run != 0 && config.max_run <= static_cast<uint64_t>(config.hop) + 2ULL * config.padding) {
25 return "Interval scan run cap must exceed one hop plus twice the padding";
26 }
27 return {};
28}

References MayaFlux::Kinesis::Discrete::IntervalScanConfig::enter, MayaFlux::Kinesis::Discrete::IntervalScanConfig::gate_threshold, MayaFlux::Kinesis::Discrete::IntervalScanConfig::hop, MayaFlux::Kinesis::Discrete::IntervalScanConfig::leave, MayaFlux::Kinesis::Discrete::IntervalScanConfig::max_run, and MayaFlux::Kinesis::Discrete::IntervalScanConfig::padding.

Referenced by MayaFlux::Yantra::IntervalExtractor< Eigen::MatrixXd, std::vector< std::vector< double > > >::check_settings(), MayaFlux::Yantra::SpeechSegmenter< std::vector< Kakshya::DataVariant >, Kakshya::RegionGroup >::diagnose(), MayaFlux::Yantra::interval_scan_stage(), and MayaFlux::Kinesis::Discrete::IntervalScanner::IntervalScanner().

Here is the caller graph for this function: