Struct monument::Composition
source · [−]pub struct Composition { /* private fields */ }Expand description
A Composition generated by Monument.
Implementations
sourceimpl Composition
impl Composition
sourcepub fn call_string(&self) -> String
pub fn call_string(&self) -> String
Generate a human-friendly String summarising the calling of this composition. For
example, this composition would have a
call_string of D[B]BL[W]N[M]SE[sH]NCYW[sH].
sourcepub fn rows(&self) -> Block<(MethodId, usize)>
pub fn rows(&self) -> Block<(MethodId, usize)>
Return a Block containing the Rows in this composition. Each Row is annotated
with a (method index, index within a lead) pair. For example, splicing a lead of Bastow
into Cambridge Major would create a Block which starts like:
Block {
12345678: (<ID of Bastow>, 0),
21436587: (<ID of Bastow>, 1),
21345678: (<ID of Bastow>, 2),
12436587: (<ID of Bastow>, 3),
14263857: (<ID of Cambridge>, 0),
41628375: (<ID of Cambridge>, 1),
14682735: (<ID of Cambridge>, 2),
41867253: (<ID of Cambridge>, 3),
48162735: (<ID of Cambridge>, 4),
...
}sourcepub fn total_score(&self) -> f32
pub fn total_score(&self) -> f32
The total score generated by this composition from all the different weights (music, calls, changes of method, handbell coursing, etc.).
sourcepub fn average_score(&self) -> f32
pub fn average_score(&self) -> f32
The average score generated by each Row in this composition. This is equal to
self.total_score() / self.length() as f32.
sourcepub fn music_score(&self) -> f32
pub fn music_score(&self) -> f32
Score generated by just the MusicTypes (not including calls, changes of methods,
etc.).
sourcepub fn method_counts(&self) -> &[usize]
pub fn method_counts(&self) -> &[usize]
sourcepub fn music_counts(&self) -> &HashMap<MusicTypeId, usize>
pub fn music_counts(&self) -> &HashMap<MusicTypeId, usize>
sourcepub fn contiguous_duffer_lengths(
&self
) -> impl DoubleEndedIterator<Item = usize> + '_
pub fn contiguous_duffer_lengths(
&self
) -> impl DoubleEndedIterator<Item = usize> + '_
Return an Iterator over the number of Rows in each transition between
non_duffer_courses.
sourcepub fn total_duffer(&self) -> usize
pub fn total_duffer(&self) -> usize
Returns the total number of Rows of duffer courses (i.e. those not in
SearchBuilder::non_duffer_courses) present in this composition.
Trait Implementations
sourceimpl Clone for Composition
impl Clone for Composition
sourcefn clone(&self) -> Composition
fn clone(&self) -> Composition
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more