pub struct SinglePart { /* private fields */ }Expand description
One part of a score being corrected, its measures’ rhythms and those
flagged: music21’s SinglePart.
Implementations§
Source§impl SinglePart
impl SinglePart
Sourcepub fn part_number(&self) -> usize
pub fn part_number(&self) -> usize
The part’s place among the score’s parts.
Sourcepub fn hashed_notes(&self) -> &[String]
pub fn hashed_notes(&self) -> &[String]
The rhythm of each measure, as measure_hash writes it, as they
stood when the corrector was made or the part last corrected:
music21’s hashedNotes.
Sourcepub fn incorrect_measures(&self) -> &[usize]
pub fn incorrect_measures(&self) -> &[usize]
The indices of the measures whose notes do not fill their bars:
music21’s incorrectMeasures.
Sourcepub fn horizontal_probability_dist(&mut self) -> &[FloatType] ⓘ
pub fn horizontal_probability_dist(&mut self) -> &[FloatType] ⓘ
For each distance from one measure to another, from one less than
the number of measures back to as many forward, the share of
measures whose rhythm is like the one that far away – as music21
counts likeness, where the same rhythm and a wholly different one
both count, and the distance nought counts every measure: music21’s
horizontalProbabilityDist. Worked out once and kept.
Sourcepub fn index_array(&self) -> Option<&[i64]>
pub fn index_array(&self) -> Option<&[i64]>
The distance from one measure to another each entry of
Self::horizontal_probability_dist is for, once it has been worked
out: music21’s indexArray.
Sourcepub fn probability_distribution(
&mut self,
source: usize,
destination: usize,
) -> FloatType
pub fn probability_distribution( &mut self, source: usize, destination: usize, ) -> FloatType
How likely a measure as far from another as source is from
destination has its rhythm: music21’s getProbabilityDistribution.
Sourcepub fn run_horizontal_search(&mut self, i: usize) -> MeasureRelationship
pub fn run_horizontal_search(&mut self, i: usize) -> MeasureRelationship
The measure of this part most likely to correct the ith flagged
one: of those not flagged, the one most likely misread as it by its
changes, times how likely its distance is, the first of those as
likely: music21’s runHorizontalSearch.
Sourcepub fn run_horizontal_correction_model(&mut self) -> Vec<MeasureRelationship>
pub fn run_horizontal_correction_model(&mut self) -> Vec<MeasureRelationship>
Self::run_horizontal_search for every flagged measure: music21’s
runHorizontalCorrectionModel.
Trait Implementations§
Source§impl Clone for SinglePart
impl Clone for SinglePart
Source§impl Debug for SinglePart
impl Debug for SinglePart
Source§impl<'de> Deserialize<'de> for SinglePart
Available on crate feature serde only.
impl<'de> Deserialize<'de> for SinglePart
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SinglePart
impl PartialEq for SinglePart
Source§impl Serialize for SinglePart
Available on crate feature serde only.
impl Serialize for SinglePart
serde only.impl StructuralPartialEq for SinglePart
Auto Trait Implementations§
impl Freeze for SinglePart
impl RefUnwindSafe for SinglePart
impl Send for SinglePart
impl Sync for SinglePart
impl Unpin for SinglePart
impl UnsafeUnpin for SinglePart
impl UnwindSafe for SinglePart
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more