Skip to main content

nominal_api/conjure/objects/scout/compute/api/
periodogram.rs

1/// Returns the spectral density estimate (i.e. PSD) of the input series.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct Periodogram {
14    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
15    #[serde(rename = "input")]
16    input: Box<super::NumericSeries>,
17    #[serde(rename = "method")]
18    method: super::PeriodogramMethod,
19}
20impl Periodogram {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(input: super::NumericSeries, method: super::PeriodogramMethod) -> Self {
24        Self::builder().input(input).method(method).build()
25    }
26    #[inline]
27    pub fn input(&self) -> &super::NumericSeries {
28        &*self.input
29    }
30    #[inline]
31    pub fn method(&self) -> &super::PeriodogramMethod {
32        &self.method
33    }
34}