Skip to content

Commit

Permalink
Remove unused Subgrid::shape and Grid::interpolations
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Dec 19, 2024
1 parent 0d6f583 commit a5861ce
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 21 deletions.
4 changes: 0 additions & 4 deletions pineappl/src/empty_subgrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 0 additions & 6 deletions pineappl/src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down
4 changes: 0 additions & 4 deletions pineappl/src/import_subgrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 0 additions & 4 deletions pineappl/src/interp_subgrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions pineappl/src/subgrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a5861ce

Please sign in to comment.