From a5861cec0f2636b845b1eed677ceaac05c0bad43 Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Thu, 19 Dec 2024 13:45:42 +0100 Subject: [PATCH] Remove unused `Subgrid::shape` and `Grid::interpolations` --- pineappl/src/empty_subgrid.rs | 4 ---- pineappl/src/grid.rs | 6 ------ pineappl/src/import_subgrid.rs | 4 ---- pineappl/src/interp_subgrid.rs | 4 ---- pineappl/src/subgrid.rs | 3 --- 5 files changed, 21 deletions(-) diff --git a/pineappl/src/empty_subgrid.rs b/pineappl/src/empty_subgrid.rs index bacc4ced..8c08d0ff 100644 --- a/pineappl/src/empty_subgrid.rs +++ b/pineappl/src/empty_subgrid.rs @@ -18,10 +18,6 @@ impl Subgrid for EmptySubgridV1 { Vec::new() } - fn shape(&mut self) -> &[usize] { - panic!("EmptySubgridV1 doesn't have a shape"); - } - fn is_empty(&self) -> bool { true } diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 2eeba58e..d2179aef 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -205,12 +205,6 @@ impl Grid { &mut self.pid_basis } - /// Return a vector containing the interpolation specifications for this grid. - #[must_use] - pub fn interpolations(&self) -> &[Interp] { - &self.interps - } - /// Return a vector containing the kinematic specifications for this grid. #[must_use] pub fn kinematics(&self) -> &[Kinematics] { diff --git a/pineappl/src/import_subgrid.rs b/pineappl/src/import_subgrid.rs index 93c5b2aa..7e796e01 100644 --- a/pineappl/src/import_subgrid.rs +++ b/pineappl/src/import_subgrid.rs @@ -112,10 +112,6 @@ impl Subgrid for ImportSubgridV1 { Box::new(self.array.indexed_iter()) } - fn shape(&mut self) -> &[usize] { - self.array.shape() - } - fn stats(&self) -> Stats { Stats { total: self.array.shape().iter().product(), diff --git a/pineappl/src/interp_subgrid.rs b/pineappl/src/interp_subgrid.rs index 2504cb97..93705ac3 100644 --- a/pineappl/src/interp_subgrid.rs +++ b/pineappl/src/interp_subgrid.rs @@ -52,10 +52,6 @@ impl Subgrid for InterpSubgridV1 { self.array.is_empty() } - fn shape(&mut self) -> &[usize] { - self.array.shape() - } - fn merge(&mut self, other: &SubgridEnum, transpose: Option<(usize, usize)>) { // we cannot use `Self::indexed_iter` because it multiplies with `reweight` if let SubgridEnum::InterpSubgridV1(other) = other { diff --git a/pineappl/src/subgrid.rs b/pineappl/src/subgrid.rs index 24f11cb4..21836dca 100644 --- a/pineappl/src/subgrid.rs +++ b/pineappl/src/subgrid.rs @@ -74,9 +74,6 @@ pub trait Subgrid { /// Scale the subgrid by `factor`. fn scale(&mut self, factor: f64); - /// Return the shape of the subgrid - fn shape(&mut self) -> &[usize]; - /// Assume that the convolution functions for indices `a` and `b` for this grid are the same /// and use this to optimize the size of the grid. fn symmetrize(&mut self, a: usize, b: usize);