qualia_core_db/tensor/
spectral.rs1use serde::{Deserialize, Serialize};
4
5#[repr(C)]
7#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
8pub struct SpectralDecomposition {
9 pub amplitude: f32,
10 pub phase: f32,
11 pub frequency: f32,
12}
13
14impl Default for SpectralDecomposition {
15 fn default() -> Self {
16 Self {
17 amplitude: 0.0,
18 phase: 0.0,
19 frequency: 0.0,
20 }
21 }
22}
23
24impl SpectralDecomposition {
25 pub fn new(amplitude: f32, phase: f32, frequency: f32) -> Self {
26 Self {
27 amplitude,
28 phase,
29 frequency,
30 }
31 }
32}