/// Get the permutation that would restore the original order of the data,
/// if one were to simply concatenate the partitioned structures produced
/// by applying this `Part`.
Get the permutation that would restore the original order of the data,
if one were to simply concatenate the partitioned structures produced
by applying this `Part`.
Get the permutation that would restore the original order of the data if one were to simply concatenate the partitioned structures produced by applying this ` Part ` .
pub fn restoring_perm(&self) -> Perm
    {
        // get the composite perm that produces the concatenated order from the original
        // (note: not the same as `composite_perm_for_part_lifo` because concatenation
        //        produces the fifo order)
        let mut perm_vec = vec![];
        for (_, ref piece) in &self.part {
            // (due to the convention that the order within a part matches the original order,
            //  we must sort the indices in each part)
            // (FIXME: maybe they should be stored as already sorted in the Part, since
            //         the order of indices in Part's partitions never matters anyways?)
            let mut sorted_piece = piece.clone();
            sorted_piece.sort();
            perm_vec.extend(sorted_piece);
        }
        // invert to restore the original order
        Perm::from_raw_inv(perm_vec).expect("BUG")
    }
pub fn restoring_perm ( & self ) -> Perm { // get the composite perm that produces the concatenated order from the original // (note: not the same as `composite_perm_for_part_lifo` because concatenation //        produces the fifo order) let mut perm_vec = vec ! [ ] ; for ( _ , ref piece ) in & self . part { // (due to the convention that the order within a part matches the original order, //  we must sort the indices in each part) // (FIXME: maybe they should be stored as already sorted in the Part, since //         the order of indices in Part's partitions never matters anyways?) let mut sorted_piece = piece . clone ( ) ; sorted_piece . sort ( ) ; perm_vec . extend ( sorted_piece ) ; } // invert to restore the original order Perm :: from_raw_inv ( perm_vec ) . expect ( " " ) }
Get the permutation that would restore the original order of the data,
if one were to simply concatenate the partitioned structures produced
by applying this `Part`.
Get the permutation that would restore the original order of the data if one were to simply concatenate the partitioned structures produced by applying this ` Part ` .
&self