pub fn pre_accumulate(&mut self, transposition: &impl Transposition) {
        // We can't inline this if statement, because doing so would require us to clone the
        // Change or anger the borrow checker.
        if self.using_second_change {
            self.change_2
                .pre_multiply_into(transposition, &mut self.change_1);
        } else {
            self.change_1
                .pre_multiply_into(transposition, &mut self.change_2);
        }

        // Swap the buffers so that the result is in the 'front' buffer
        self.using_second_change = !self.using_second_change;
    }
/// Accumulate a [Transposition] into the accumulator, but premultiply it instead of
/// postmultiplying like you usually would.  In ringing terms, this has the effect of the
/// [Transposition] being rung **before** all the other [Transposition]s already accumulated.
/// Useful for tasks like adding a part-head to a [Change] you've already calculated.
///
/// # Example
/// ```
/// use bellmetal::{Change, ChangeAccumulator, Stage};
///
/// let mut accum = ChangeAccumulator::new(Stage::ROYAL);
///
/// // Accumulate a change that we might find in the plain course of a musical method
/// accum.accumulate(&Change::from("5124367890"));
///
/// // Pre-accumulate a cyclic part head to find out what that change would be in that
/// // particular part
/// accum.pre_accumulate(&Change::from("1678902345"));
///
/// assert_eq!(accum.total(), &Change::from("9168702345"));
/// ```
Accumulate a [Transposition] into the accumulator, but premultiply it instead of
postmultiplying like you usually would.  In ringing terms, this has the effect of the
[Transposition] being rung **before** all the other [Transposition]s already accumulated.
Useful for tasks like adding a part-head to a [Change] you've already calculated.
Accumulate a [ Transposition ] into the accumulator but premultiply it instead of postmultiplying like you usually would . In ringing terms this has the effect of the [ Transposition ] being rung ** before ** all the other [ Transposition ] s already accumulated . Useful for tasks like adding a part - head to a [ Change ] you ' ve already calculated .
pub fn pre_accumulate(&mut self, transposition: &impl Transposition) {
        // We can't inline this if statement, because doing so would require us to clone the
        // Change or anger the borrow checker.
        if self.using_second_change {
            self.change_2
                .pre_multiply_into(transposition, &mut self.change_1);
        } else {
            self.change_1
                .pre_multiply_into(transposition, &mut self.change_2);
        }
        // Swap the buffers so that the result is in the 'front' buffer
        self.using_second_change = !self.using_second_change;
    }
pub fn pre_accumulate ( & mut self , transposition : & impl Transposition ) { // We can't inline this if statement, because doing so would require us to clone the // Change or anger the borrow checker. if self . using_second_change { self . change_2 . pre_multiply_into ( transposition , & mut self . change_1 ) ; } else { self . change_1 . pre_multiply_into ( transposition , & mut self . change_2 ) ; } // Swap the buffers so that the result is in the 'front' buffer self . using_second_change = ! self . using_second_change ; }
Accumulate a [Transposition] into the accumulator, but premultiply it instead of
postmultiplying like you usually would.
Accumulate a [ Transposition ] into the accumulator but premultiply it instead of postmultiplying like you usually would .
&mut self
transposition
&impl Transposition
&mut self
transposition
&impl Transposition
example
```
use bellmetal::{Change, ChangeAccumulator, Stage}.

let mut accum = ChangeAccumulator::new(Stage::ROYAL).

Accumulate a change that we might find in the plain course of a musical method
accum.accumulate(&Change::from("5124367890")).

Pre-accumulate a cyclic part head to find out what that change would be in that
particular part
accum.pre_accumulate(&Change::from("1678902345")).


` ` ` use bellmetal :: { Change ChangeAccumulator Stage } . let mut accum = ChangeAccumulator :: new ( Stage :: ROYAL ) . Accumulate a change that we might find in the plain course of a musical method accum . accumulate ( &Change :: from ( " 5124367890 " )) . Pre - accumulate a cyclic part head to find out what that change would be in that particular part accum . pre_accumulate ( &Change :: from ( " 1678902345 " )) .