sliding_features 10.0.0

Modular sliding window with various signal processing functions and technical indicators
Documentation
/// provide data for tests for consistent plotting, generated from test generate_test_data
pub const TEST_DATA: [f64; 256] = [
    99.3443859531321,
    99.01796871838589,
    98.73294124423916,
    97.2739698578621,
    96.58956429476007,
    96.17405687656834,
    95.5504917649603,
    95.2258896307167,
    96.71669907742658,
    97.68548584014461,
    97.35679689790979,
    97.98148906225232,
    97.74744187507619,
    95.82834576145414,
    95.63693788813393,
    96.20863302917208,
    93.87439647771104,
    93.34124486284382,
    93.62226984322741,
    93.32529230570216,
    93.56324809850148,
    93.43950793092951,
    92.326980457101,
    93.31877423830359,
    92.68230194423907,
    93.39179868847415,
    93.12019397044874,
    95.05250167555539,
    96.19094034592094,
    95.96958343623919,
    95.28203330541099,
    96.66344563833844,
    97.15242184893589,
    98.35607085463742,
    100.16063999413541,
    101.83340122396639,
    102.84788098841419,
    103.71940415571392,
    104.62953335838891,
    103.98969238953936,
    103.91309409983153,
    103.2851387866162,
    102.17644850273467,
    102.01770624080842,
    103.56396149120575,
    104.43856685018562,
    105.8824505415504,
    104.04750937370548,
    104.09801102299349,
    103.88711700838368,
    102.45772409283933,
    101.26840195757961,
    101.30376081720475,
    100.58265282387622,
    100.63084239896286,
    100.15531634387614,
    99.20069957542664,
    97.48983886669224,
    97.72475995163315,
    99.50768820319824,
    100.24757563227178,
    98.41326855301413,
    99.34289078958523,
    98.92949468088315,
    98.20091997179189,
    100.02499529267772,
    98.14340038604517,
    98.89354868550257,
    100.02386256422953,
    101.9676873300173,
    101.13328552608908,
    100.9312639545906,
    101.10410640188124,
    100.50887594983548,
    102.98327070137287,
    101.90953764601055,
    101.99961079265714,
    102.60399303300879,
    100.74003219666174,
    100.34066727318698,
    100.48170502066017,
    101.29396325759843,
    101.68763421570961,
    103.03442974009931,
    103.20031682442183,
    101.91054025149595,
    103.63890162440866,
    105.59196339950319,
    105.22208375287964,
    107.56161068431278,
    108.67977448126737,
    107.69847508418036,
    107.63696511110226,
    108.96674461169215,
    109.87167765408688,
    109.0801602030226,
    107.12405681564934,
    107.56557791776585,
    108.03483947377255,
    108.48271295210924,
    109.50093731378043,
    109.45608398995721,
    108.50297845841158,
    106.89522563380511,
    105.89347772431637,
    106.2563969568064,
    107.32986401521974,
    105.90380926315483,
    106.79861579524628,
    106.53393268987247,
    105.89009112293725,
    105.89576994319575,
    106.11362601421654,
    105.90851633533542,
    105.54069745623849,
    106.04117227747543,
    107.39473362242643,
    105.58500713055203,
    104.3076949768713,
    105.62951387151354,
    105.29865865305393,
    104.32385673917688,
    104.6089300169441,
    106.22314104991864,
    106.52125916849918,
    105.95650754911641,
    105.97186915917985,
    104.93440861375129,
    105.38600916973475,
    105.10483943066369,
    104.01844025090355,
    105.98810848434191,
    107.77560060835235,
    107.6596801390034,
    109.47819790618092,
    110.76791345927869,
    111.5580651539678,
    110.7264086523916,
    111.03736020427613,
    109.36130057380936,
    108.11951660680839,
    108.94542278329558,
    109.8026161613033,
    109.36923017919733,
    110.21793943155153,
    112.27064126251435,
    112.74011314418512,
    111.59881833861996,
    113.78963822470962,
    113.99135964686687,
    114.86852753099278,
    114.69675269261997,
    114.74986044406559,
    115.97723154374691,
    118.1395035355269,
    119.968241896465,
    120.07451182569149,
    119.76187307383526,
    118.22757845304308,
    117.55021801413554,
    117.33099500993167,
    116.57984737778312,
    117.47135822225023,
    117.05222836193262,
    117.70426871806892,
    118.32263871396299,
    118.96813922280398,
    120.26005748381039,
    118.29504464181535,
    118.29410294906351,
    118.61298833618902,
    119.20841311783735,
    117.75137033619453,
    117.07616496391844,
    114.0268027078526,
    112.10908997440627,
    112.29405246504002,
    111.65125719045339,
    110.01869918721582,
    109.73911268914264,
    110.96694397553058,
    112.52469951419455,
    112.2678514823442,
    114.06592626475438,
    113.9543980204273,
    113.74409768364886,
    112.97995588514443,
    112.3620894379739,
    110.18260732273959,
    108.91341835244836,
    108.5394576575903,
    108.97518270149718,
    110.0600514595192,
    109.48542519756982,
    109.63374934173866,
    108.36508419484343,
    109.87214324107256,
    112.09073221444038,
    111.38430877625467,
    108.92579174472556,
    108.4179571306924,
    106.37004008179791,
    106.04054373469694,
    105.38070510014745,
    104.32807616433209,
    104.81075235112503,
    106.2340803987244,
    107.81582140534051,
    108.1083492556622,
    106.49409983905444,
    106.88426975477003,
    109.00131994428816,
    109.1389258976682,
    107.32316730132652,
    107.77398137297342,
    108.98428561744404,
    107.86583322680377,
    108.3401230095469,
    110.77081722769685,
    110.47086842516178,
    110.3214146405094,
    109.2540456718041,
    110.98001639596882,
    112.18860089194166,
    113.09393873472656,
    113.0115186222329,
    113.53829957214127,
    114.1716308645449,
    114.9895228633777,
    113.88473868520654,
    112.83495564882135,
    113.2335442948531,
    112.7118291646537,
    111.24027986720239,
    112.33218285473248,
    112.12194766720192,
    111.45354009181551,
    111.93755652073081,
    112.38140571207704,
    112.57603159435519,
    112.19022345238757,
    112.96309756483599,
    112.2185392010747,
    114.52267981924768,
    114.69782518517519,
    114.38973705522415,
    115.29051275695146,
    115.2111636571004,
    114.01220950064518,
    113.85716523541734,
    114.38517373586262,
    112.99596969377843,
    111.44647816263287,
    110.20777061619351,
    109.36788471095252,
    108.74101451836995,
];

#[cfg(test)]
mod tests {
    use rand::{
        SeedableRng,
        rngs::SmallRng,
    };
    use time_series_generator::generate_standard_normal;

    #[test]
    fn generate_test_data() {
        let data_len: usize = 256;
        let mut rng = SmallRng::seed_from_u64(0);
        let vals: Vec<f64> = generate_standard_normal(&mut rng, data_len, 100.0);
        println!("vals: {:?}", vals);
    }
}