Skip to content

Commit

Permalink
Move Order into new module boc
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed May 28, 2024
1 parent e203ec1 commit a1156f5
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- moved `Order` and `ParseOrderError` to their own module `order`
- moved `Order` and `ParseOrderError` to the new module `boc`

### Removed

Expand Down
9 changes: 5 additions & 4 deletions pineappl/src/order.rs → pineappl/src/boc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! TODO
//! Module containing structures for the 3 dimensions of a [`Grid`]: bins, [`Order`] and channels
//! (`boc`).
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
Expand Down Expand Up @@ -130,7 +131,7 @@ impl Order {
/// - the mixed NNLO QCD—EW.
///
/// ```rust
/// use pineappl::order::Order;
/// use pineappl::boc::Order;
///
/// let orders = [
/// Order::new(0, 2, 0, 0), // LO : alpha^2
Expand Down Expand Up @@ -161,7 +162,7 @@ impl Order {
/// `true`:
///
/// ```rust
/// use pineappl::order::Order;
/// use pineappl::boc::Order;
///
/// let orders = [
/// Order::new(0, 2, 0, 0), // LO : alpha^2
Expand All @@ -178,7 +179,7 @@ impl Order {
/// the selection for different LOs:
///
/// ```rust
/// use pineappl::order::Order;
/// use pineappl::boc::Order;
///
/// let orders = [
/// Order::new(2, 0, 0, 0), // LO QCD : alphas^2
Expand Down
2 changes: 1 addition & 1 deletion pineappl/src/evolution.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! Supporting classes and functions for [`Grid::evolve`].
use super::boc::Order;
use super::grid::{Convolution, Grid, GridError};
use super::import_only_subgrid::ImportOnlySubgridV2;
use super::lumi::LumiEntry;
use super::lumi_entry;
use super::order::Order;
use super::sparse_array3::SparseArray3;
use super::subgrid::{Mu2, Subgrid, SubgridEnum};
use float_cmp::approx_eq;
Expand Down
2 changes: 1 addition & 1 deletion pineappl/src/fk_table.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Provides the [`FkTable`] type.
use super::boc::Order;
use super::grid::{Convolution, Grid, GridError};
use super::lumi::LumiCache;
use super::order::Order;
use super::subgrid::Subgrid;
use float_cmp::approx_eq;
use ndarray::Array4;
Expand Down
2 changes: 1 addition & 1 deletion pineappl/src/grid.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//! Module containing all traits and supporting structures for grids.
use super::bin::{BinInfo, BinLimits, BinRemapper};
use super::boc::Order;
use super::empty_subgrid::EmptySubgridV1;
use super::evolution::{self, AlphasTable, EvolveInfo, OperatorInfo, OperatorSliceInfo};
use super::fk_table::FkTable;
use super::import_only_subgrid::ImportOnlySubgridV2;
use super::lagrange_subgrid::{LagrangeSparseSubgridV1, LagrangeSubgridV1, LagrangeSubgridV2};
use super::lumi::{LumiCache, LumiEntry};
use super::ntuple_subgrid::NtupleSubgridV1;
use super::order::Order;
use super::pids::{self, PidBasis};
use super::subgrid::{ExtraSubgridParams, Mu2, Subgrid, SubgridEnum, SubgridParams};
use bitflags::bitflags;
Expand Down
2 changes: 1 addition & 1 deletion pineappl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
mod convert;

pub mod bin;
pub mod boc;
pub mod empty_subgrid;
pub mod evolution;
pub mod fk_table;
Expand All @@ -45,7 +46,6 @@ pub mod import_only_subgrid;
pub mod lagrange_subgrid;
pub mod lumi;
pub mod ntuple_subgrid;
pub mod order;
pub mod packed_array;
pub mod pids;
pub mod sparse_array3;
Expand Down
2 changes: 1 addition & 1 deletion pineappl/tests/drell_yan_lo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use float_cmp::assert_approx_eq;
use lhapdf::Pdf;
use num_complex::Complex;
use pineappl::bin::BinRemapper;
use pineappl::boc::Order;
use pineappl::grid::{Grid, GridOptFlags, Ntuple};
use pineappl::lumi::LumiCache;
use pineappl::lumi_entry;
use pineappl::order::Order;
use pineappl::subgrid::{ExtraSubgridParams, Subgrid, SubgridEnum, SubgridParams};
use rand::Rng;
use rand_pcg::Pcg64;
Expand Down
2 changes: 1 addition & 1 deletion pineappl_capi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
use itertools::izip;
use pineappl::bin::BinRemapper;
use pineappl::boc::Order;
use pineappl::grid::{Grid, GridOptFlags, Ntuple};
use pineappl::lumi::{LumiCache, LumiEntry};
use pineappl::order::Order;
use pineappl::subgrid::{ExtraSubgridParams, SubgridParams};
use std::collections::HashMap;
use std::ffi::{CStr, CString};
Expand Down
2 changes: 1 addition & 1 deletion pineappl_cli/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use super::{GlobalConfiguration, Subcommand};
use anyhow::{anyhow, Result};
use clap::builder::{PossibleValuesParser, TypedValueParser};
use clap::{Parser, ValueHint};
use pineappl::boc::Order;
use pineappl::grid::Grid;
use pineappl::order::Order;
use std::path::{Path, PathBuf};
use std::process::ExitCode;

Expand Down
2 changes: 1 addition & 1 deletion pineappl_cli/src/export/applgrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use anyhow::{anyhow, bail, Result};
use cxx::{let_cxx_string, UniquePtr};
use float_cmp::approx_eq;
use ndarray::{s, Axis};
use pineappl::boc::Order;
use pineappl::grid::{Convolution, Grid};
use pineappl::order::Order;
use pineappl::subgrid::{Mu2, Subgrid, SubgridParams};
use pineappl_applgrid::ffi::{self, grid};
use std::borrow::Cow;
Expand Down
2 changes: 1 addition & 1 deletion pineappl_cli/src/import/applgrid.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use anyhow::Result;
use pineappl::boc::Order;
use pineappl::grid::{Convolution, Grid};
use pineappl::import_only_subgrid::ImportOnlySubgridV2;
use pineappl::lumi::LumiEntry;
use pineappl::order::Order;
use pineappl::sparse_array3::SparseArray3;
use pineappl::subgrid::{Mu2, SubgridParams};
use pineappl_applgrid::ffi::{self, grid};
Expand Down
2 changes: 1 addition & 1 deletion pineappl_cli/src/import/fastnlo.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use anyhow::Result;
use itertools::Itertools;
use pineappl::bin::BinRemapper;
use pineappl::boc::Order;
use pineappl::grid::{Convolution, Grid};
use pineappl::import_only_subgrid::ImportOnlySubgridV2;
use pineappl::lumi::LumiEntry;
use pineappl::order::Order;
use pineappl::sparse_array3::SparseArray3;
use pineappl::subgrid::{Mu2, SubgridParams};
use pineappl_fastnlo::ffi::{
Expand Down
2 changes: 1 addition & 1 deletion pineappl_cli/src/import/fktable.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use anyhow::{anyhow, Context, Result};
use flate2::read::GzDecoder;
use pineappl::boc::Order;
use pineappl::grid::{Convolution, Grid};
use pineappl::import_only_subgrid::ImportOnlySubgridV1;
use pineappl::lumi_entry;
use pineappl::order::Order;
use pineappl::sparse_array3::SparseArray3;
use pineappl::subgrid::SubgridParams;
use std::fs::File;
Expand Down
2 changes: 1 addition & 1 deletion pineappl_cli/src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use super::{GlobalConfiguration, Subcommand};
use anyhow::Result;
use clap::{Args, Parser, ValueHint};
use itertools::Itertools;
use pineappl::boc::Order;
use pineappl::fk_table::FkTable;
use pineappl::order::Order;
use prettytable::{cell, row, Row};
use std::path::PathBuf;
use std::process::ExitCode;
Expand Down
2 changes: 1 addition & 1 deletion pineappl_cli/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use clap::{
ValueHint,
};
use pineappl::bin::BinRemapper;
use pineappl::boc::Order;
use pineappl::fk_table::{FkAssumptions, FkTable};
use pineappl::lumi::LumiEntry;
use pineappl::order::Order;
use pineappl::pids;
use pineappl::pids::PidBasis;
use std::fs;
Expand Down

0 comments on commit a1156f5

Please sign in to comment.