From f4a04dfd86c28b394f342f8956f6ad4a1680b292 Mon Sep 17 00:00:00 2001 From: Polochon-street Date: Sun, 6 Jun 2021 16:47:01 +0200 Subject: [PATCH] =?UTF-8?q?Make=20`to=5Fvec`=C2=A0public.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/song.rs | 9 ++++++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9014a66..3e258a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## bliss 0.2.4 +* Make `Analysis::to_vec()` public. + ## bliss 0.2.3 * Made `NUMBER_FEATURES` public. diff --git a/Cargo.lock b/Cargo.lock index 7679db0..673b1f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,7 +75,7 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bliss-audio" -version = "0.2.3" +version = "0.2.4" dependencies = [ "bliss-audio-aubio-rs", "crossbeam", diff --git a/Cargo.toml b/Cargo.toml index bfba80e..a1f2637 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bliss-audio" -version = "0.2.3" +version = "0.2.4" authors = ["Polochon-street "] edition = "2018" license = "GPL-3.0-only" diff --git a/src/song.rs b/src/song.rs index 3098a77..4442981 100644 --- a/src/song.rs +++ b/src/song.rs @@ -156,15 +156,18 @@ impl Analysis { } } - /// Return an ndarray `arr1`. + /// Return an ndarray `Array1` representing the analysis' features. /// /// Particularly useful if you want to make a custom distance metric. pub fn to_arr1(&self) -> Array1 { arr1(&self.internal_analysis) } - #[allow(dead_code)] - pub(crate) fn to_vec(&self) -> Vec { + /// Return a Vec representing the analysis' features. + /// + /// Particularly useful if you want iterate through the values to store + /// them somewhere. + pub fn to_vec(&self) -> Vec { self.internal_analysis.to_vec() }