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

◆ peak() [2/3]

MAYAFLUX_API double MayaFlux::peak ( const std::vector< double > &  data)

Find peak amplitude in single-channel data.

Parameters
dataInput data
Returns
Peak amplitude value

Definition at line 268 of file Yantra.cpp.

269{
270 static const auto s_op = [] {
271 auto a = std::make_shared<Yantra::StandardEnergyAnalyzer>();
272 a->set_energy_method(Yantra::EnergyMethod::PEAK);
273 return a;
274 }();
275 auto result = s_op->analyze_energy({ Kakshya::DataVariant(data) });
276 return result.channels.empty() ? 0.0 : result.channels[0].max_energy;
277}
size_t a

References a, and MayaFlux::Yantra::PEAK.

Referenced by MayaFlux::Kinesis::Discrete::auto_correlate(), normalize_together(), peak_channel(), and MayaFlux::Yantra::MathematicalTransformer< InputType, OutputType >::transform_implementation().

+ Here is the caller graph for this function: