pub struct StyleVector {
pub dims: [f64; 109],
}Fields§
§dims: [f64; 109]Implementations§
Source§impl StyleVector
impl StyleVector
pub fn new(data: &[f64]) -> Self
Sourcepub fn cosine_similarity(&self, other: &StyleVector) -> f64
pub fn cosine_similarity(&self, other: &StyleVector) -> f64
Cosine similarity
Sourcepub fn euclidean_distance(&self, other: &StyleVector) -> f64
pub fn euclidean_distance(&self, other: &StyleVector) -> f64
Euclidean distance
Sourcepub fn to_5d(&self) -> [f64; 5]
pub fn to_5d(&self) -> [f64; 5]
Reduce to 5-dim style primitives using positions 0-108: pitch_complexity: avg of dims 0-47 (first 48 pitch bins) timing_expressiveness: dims 48-55 (timing-related features) velocity_energy: dims 56-63 (velocity-related) articulation_clarity: dims 64-71 (articulation) timbral_breadth: dims 72-79 (timbre/register)
Trait Implementations§
Source§impl Clone for StyleVector
impl Clone for StyleVector
Source§fn clone(&self) -> StyleVector
fn clone(&self) -> StyleVector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StyleVector
impl RefUnwindSafe for StyleVector
impl Send for StyleVector
impl Sync for StyleVector
impl Unpin for StyleVector
impl UnsafeUnpin for StyleVector
impl UnwindSafe for StyleVector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more