Skip to content

Commit

Permalink
Make ravel functions private again
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Sep 17, 2024
1 parent 315e285 commit 72beb7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pineappl/src/packed_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl<T: Copy + Default + PartialEq> PackedArray<T> {
}

/// Converts a `multi_index` into a flat index.
pub fn ravel_multi_index(multi_index: &[usize], shape: &[usize]) -> usize {
fn ravel_multi_index(multi_index: &[usize], shape: &[usize]) -> usize {
assert_eq!(multi_index.len(), shape.len());

multi_index
Expand All @@ -174,7 +174,7 @@ pub fn ravel_multi_index(multi_index: &[usize], shape: &[usize]) -> usize {
///
/// Panics when `index` is out of range.
#[must_use]
pub fn unravel_index<const D: usize>(mut index: usize, shape: &[usize]) -> [usize; D] {
fn unravel_index<const D: usize>(mut index: usize, shape: &[usize]) -> [usize; D] {
assert!(index < shape.iter().product());
let mut indices = [0; D];
for (i, d) in indices.iter_mut().zip(shape).rev() {
Expand Down

0 comments on commit 72beb7a

Please sign in to comment.