From 9182bdb4dadc480180b7796af219f8c81edcecb0 Mon Sep 17 00:00:00 2001 From: t7phy Date: Thu, 17 Oct 2024 11:40:54 +0200 Subject: [PATCH] Rename `PackedQ1X2SubgridV1` to `ImportSubgridV1` --- pineappl/src/empty_subgrid.rs | 4 +- pineappl/src/evolution.rs | 4 +- pineappl/src/grid.rs | 4 +- .../{packed_subgrid.rs => import_subgrid.rs} | 22 +- pineappl/src/lib.rs | 2 +- pineappl/src/subgrid.rs | 4 +- pineappl/src/v0.rs | 4 +- pineappl/tests/drell_yan_lo.rs | 4 +- pineappl_cli/src/import/applgrid.rs | 4 +- pineappl_cli/src/import/fastnlo.rs | 6 +- pineappl_cli/src/import/fktable.rs | 6 +- pineappl_cli/src/subgrids.rs | 2 +- pineappl_cli/tests/subgrids.rs | 424 +++++++++--------- 13 files changed, 245 insertions(+), 245 deletions(-) rename pineappl/src/{packed_subgrid.rs => import_subgrid.rs} (92%) diff --git a/pineappl/src/empty_subgrid.rs b/pineappl/src/empty_subgrid.rs index 4977d082..0f7db160 100644 --- a/pineappl/src/empty_subgrid.rs +++ b/pineappl/src/empty_subgrid.rs @@ -56,7 +56,7 @@ impl Subgrid for EmptySubgridV1 { mod tests { use super::*; use crate::packed_array::PackedArray; - use crate::packed_subgrid::PackedQ1X2SubgridV1; + use crate::import_subgrid::ImportSubgridV1; use crate::v0; #[test] @@ -96,7 +96,7 @@ mod tests { let mut array = PackedArray::new(vec![1, 1]); array[0] = 1.0; let node_values = vec![NodeValues::UseThese(vec![1.0]); 2]; - let subgrid_rhs = PackedQ1X2SubgridV1::new(array, node_values).into(); + let subgrid_rhs = ImportSubgridV1::new(array, node_values).into(); subgrid_lhs.merge(&subgrid_rhs, None); } diff --git a/pineappl/src/evolution.rs b/pineappl/src/evolution.rs index a73e9b52..7a865894 100644 --- a/pineappl/src/evolution.rs +++ b/pineappl/src/evolution.rs @@ -4,7 +4,7 @@ use super::boc::{Channel, Kinematics, Order}; use super::convolutions::ConvType; use super::grid::{Grid, GridError}; use super::packed_array::PackedArray; -use super::packed_subgrid::PackedQ1X2SubgridV1; +use super::import_subgrid::ImportSubgridV1; use super::pids::PidBasis; use super::subgrid::{NodeValues, Subgrid, SubgridEnum}; use float_cmp::approx_eq; @@ -489,7 +489,7 @@ pub(crate) fn evolve_slice_with_many( } sub_fk_tables.extend(tables.into_iter().map(|table| { - PackedQ1X2SubgridV1::new( + ImportSubgridV1::new( PackedArray::from(table.insert_axis(Axis(0)).view()), node_values.clone(), ) diff --git a/pineappl/src/grid.rs b/pineappl/src/grid.rs index 5a9d62f5..1bc73a81 100644 --- a/pineappl/src/grid.rs +++ b/pineappl/src/grid.rs @@ -8,7 +8,7 @@ use super::evolution::{self, AlphasTable, EvolveInfo, OperatorSliceInfo}; use super::fk_table::FkTable; use super::interpolation::Interp; use super::interp_subgrid::InterpSubgridV1; -use super::packed_subgrid::PackedQ1X2SubgridV1; +use super::import_subgrid::ImportSubgridV1; use super::pids::PidBasis; use super::subgrid::{NodeValues, Subgrid, SubgridEnum}; use super::v0; @@ -884,7 +884,7 @@ impl Grid { } } - *subgrid = PackedQ1X2SubgridV1::from(&*subgrid).into(); + *subgrid = ImportSubgridV1::from(&*subgrid).into(); } } } diff --git a/pineappl/src/packed_subgrid.rs b/pineappl/src/import_subgrid.rs similarity index 92% rename from pineappl/src/packed_subgrid.rs rename to pineappl/src/import_subgrid.rs index 0b317bb9..02681416 100644 --- a/pineappl/src/packed_subgrid.rs +++ b/pineappl/src/import_subgrid.rs @@ -9,12 +9,12 @@ use std::mem; /// TODO #[derive(Clone, Deserialize, Serialize)] -pub struct PackedQ1X2SubgridV1 { +pub struct ImportSubgridV1 { array: PackedArray, node_values: Vec, } -impl PackedQ1X2SubgridV1 { +impl ImportSubgridV1 { /// Constructor. #[must_use] pub const fn new(array: PackedArray, node_values: Vec) -> Self { @@ -22,9 +22,9 @@ impl PackedQ1X2SubgridV1 { } } -impl Subgrid for PackedQ1X2SubgridV1 { +impl Subgrid for ImportSubgridV1 { fn fill(&mut self, _: &[Interp], _: &[f64], _: f64) { - panic!("PackedQ1X2SubgridV1 doesn't support the fill operation"); + panic!("ImportSubgridV1 doesn't support the fill operation"); } fn node_values(&self) -> Vec { @@ -121,7 +121,7 @@ impl Subgrid for PackedQ1X2SubgridV1 { } } -impl From<&SubgridEnum> for PackedQ1X2SubgridV1 { +impl From<&SubgridEnum> for ImportSubgridV1 { fn from(subgrid: &SubgridEnum) -> Self { // find smallest ranges let ranges: Vec<_> = subgrid.indexed_iter().fold( @@ -185,9 +185,9 @@ mod tests { use crate::v0; #[test] - #[should_panic(expected = "PackedQ1X2SubgridV1 doesn't support the fill operation")] + #[should_panic(expected = "ImportSubgridV1 doesn't support the fill operation")] fn fill_packed_q1x2_subgrid_v1() { - let mut subgrid = PackedQ1X2SubgridV1::new( + let mut subgrid = ImportSubgridV1::new( PackedArray::new(vec![0, 0, 0]), vec![NodeValues::UseThese(Vec::new()); 3], ); @@ -199,7 +199,7 @@ mod tests { let x = vec![ 0.015625, 0.03125, 0.0625, 0.125, 0.1875, 0.25, 0.375, 0.5, 0.75, 1.0, ]; - let mut grid1: SubgridEnum = PackedQ1X2SubgridV1::new( + let mut grid1: SubgridEnum = ImportSubgridV1::new( PackedArray::new(vec![1, 10, 10]), vec![ NodeValues::UseThese(vec![0.0]), @@ -221,7 +221,7 @@ mod tests { assert!(grid1.is_empty()); // only use exactly representable numbers here so that we can avoid using approx_eq - if let SubgridEnum::PackedQ1X2SubgridV1(ref mut x) = grid1 { + if let SubgridEnum::ImportSubgridV1(ref mut x) = grid1 { x.array[[0, 1, 2]] = 1.0; x.array[[0, 1, 3]] = 2.0; x.array[[0, 4, 3]] = 4.0; @@ -236,7 +236,7 @@ mod tests { assert_eq!(grid1.indexed_iter().nth(3), Some((vec![0, 7, 1], 8.0))); // create grid with transposed entries, but different q2 - let mut grid2: SubgridEnum = PackedQ1X2SubgridV1::new( + let mut grid2: SubgridEnum = ImportSubgridV1::new( PackedArray::new(vec![1, 10, 10]), vec![ NodeValues::UseThese(vec![1.0]), @@ -245,7 +245,7 @@ mod tests { ], ) .into(); - if let SubgridEnum::PackedQ1X2SubgridV1(ref mut x) = grid2 { + if let SubgridEnum::ImportSubgridV1(ref mut x) = grid2 { x.array[[0, 2, 1]] = 1.0; x.array[[0, 3, 1]] = 2.0; x.array[[0, 3, 4]] = 4.0; diff --git a/pineappl/src/lib.rs b/pineappl/src/lib.rs index c85ce418..ac05684c 100644 --- a/pineappl/src/lib.rs +++ b/pineappl/src/lib.rs @@ -46,6 +46,6 @@ pub mod grid; pub mod interpolation; pub mod interp_subgrid; pub mod packed_array; -pub mod packed_subgrid; +pub mod import_subgrid; pub mod pids; pub mod subgrid; diff --git a/pineappl/src/subgrid.rs b/pineappl/src/subgrid.rs index a049a6c0..cb3bc91c 100644 --- a/pineappl/src/subgrid.rs +++ b/pineappl/src/subgrid.rs @@ -2,7 +2,7 @@ use super::empty_subgrid::EmptySubgridV1; use super::interp_subgrid::InterpSubgridV1; -use super::packed_subgrid::PackedQ1X2SubgridV1; +use super::import_subgrid::ImportSubgridV1; use enum_dispatch::enum_dispatch; // use float_cmp::approx_eq; // use ndarray::Array3; @@ -99,7 +99,7 @@ pub enum SubgridEnum { /// Empty subgrid. EmptySubgridV1, /// TODO - PackedQ1X2SubgridV1, + ImportSubgridV1, } /// Structure denoting renormalization and factorization scale values. diff --git a/pineappl/src/v0.rs b/pineappl/src/v0.rs index ffe3c16a..0d45d643 100644 --- a/pineappl/src/v0.rs +++ b/pineappl/src/v0.rs @@ -5,7 +5,7 @@ use super::empty_subgrid::EmptySubgridV1; use super::grid::{Grid, GridError, Mmv4, MoreMembers}; use super::interpolation::{Interp, InterpMeth, Map, ReweightMeth}; use super::packed_array::PackedArray; -use super::packed_subgrid::PackedQ1X2SubgridV1; +use super::import_subgrid::ImportSubgridV1; use super::pids::PidBasis; use super::subgrid::{Mu2, NodeValues}; use ndarray::Array3; @@ -104,7 +104,7 @@ pub fn read_uncompressed_v0(mut reader: impl BufRead) -> Result if convolutions[1].is_some() { node_values.push(NodeValues::UseThese(subgrid.x2_grid().into_owned())); } - PackedQ1X2SubgridV1::new(array, node_values).into() + ImportSubgridV1::new(array, node_values).into() } }) .collect(), diff --git a/pineappl/tests/drell_yan_lo.rs b/pineappl/tests/drell_yan_lo.rs index 53d5bedd..a94fbeb7 100644 --- a/pineappl/tests/drell_yan_lo.rs +++ b/pineappl/tests/drell_yan_lo.rs @@ -701,7 +701,7 @@ fn grid_optimize() { // `OPTIMIZE_SUBGRID_TYPE` changes the subgrid type ... assert!(matches!( grid2.subgrids()[[0, 0, 0]], - SubgridEnum::PackedQ1X2SubgridV1 { .. } + SubgridEnum::ImportSubgridV1 { .. } )); // and the dimensions of the subgrid let node_values = grid2.subgrids()[[0, 0, 0]].node_values(); @@ -713,7 +713,7 @@ fn grid_optimize() { assert!(matches!( grid.subgrids()[[0, 0, 0]], - SubgridEnum::PackedQ1X2SubgridV1 { .. } + SubgridEnum::ImportSubgridV1 { .. } )); // if `STATIC_SCALE_DETECTION` is present the scale dimension is better optimized let node_values = grid.subgrids()[[0, 0, 0]].node_values(); diff --git a/pineappl_cli/src/import/applgrid.rs b/pineappl_cli/src/import/applgrid.rs index ad58402c..66fc2842 100644 --- a/pineappl_cli/src/import/applgrid.rs +++ b/pineappl_cli/src/import/applgrid.rs @@ -5,7 +5,7 @@ use pineappl::convolutions::{Conv, ConvType}; use pineappl::grid::Grid; use pineappl::interpolation::{Interp, InterpMeth, Map, ReweightMeth}; use pineappl::packed_array::PackedArray; -use pineappl::packed_subgrid::PackedQ1X2SubgridV1; +use pineappl::import_subgrid::ImportSubgridV1; use pineappl::pids::PidBasis; use pineappl::subgrid::{Mu2, NodeValues}; use pineappl_applgrid::ffi::{self, grid}; @@ -235,7 +235,7 @@ pub fn convert_applgrid(grid: Pin<&mut grid>, alpha: u32) -> Result { if !array.is_empty() { pgrid.subgrids_mut()[[0, bin.try_into().unwrap(), lumi]] = - PackedQ1X2SubgridV1::new( + ImportSubgridV1::new( array, vec![ NodeValues::UseThese( diff --git a/pineappl_cli/src/import/fastnlo.rs b/pineappl_cli/src/import/fastnlo.rs index b8426ded..82691d3f 100644 --- a/pineappl_cli/src/import/fastnlo.rs +++ b/pineappl_cli/src/import/fastnlo.rs @@ -7,7 +7,7 @@ use pineappl::convolutions::{Conv, ConvType}; use pineappl::grid::Grid; use pineappl::interpolation::{Interp, InterpMeth, Map, ReweightMeth}; use pineappl::packed_array::PackedArray; -use pineappl::packed_subgrid::PackedQ1X2SubgridV1; +use pineappl::import_subgrid::ImportSubgridV1; use pineappl::pids::PidBasis; use pineappl::subgrid::{Mu2, NodeValues}; use pineappl_fastnlo::ffi::{ @@ -263,7 +263,7 @@ fn convert_coeff_add_fix( if !array.is_empty() { grid.subgrids_mut() [[0, obs.try_into().unwrap(), subproc.try_into().unwrap()]] = - PackedQ1X2SubgridV1::new( + ImportSubgridV1::new( array, vec![ NodeValues::UseThese( @@ -475,7 +475,7 @@ fn convert_coeff_add_flex( // continue; // } - // *subgrid = PackedQ1X2SubgridV1::new(array, todo!()).into(); + // *subgrid = ImportSubgridV1::new(array, todo!()).into(); // } // } // } diff --git a/pineappl_cli/src/import/fktable.rs b/pineappl_cli/src/import/fktable.rs index fb8491e6..5517bc1a 100644 --- a/pineappl_cli/src/import/fktable.rs +++ b/pineappl_cli/src/import/fktable.rs @@ -7,7 +7,7 @@ use pineappl::convolutions::{Conv, ConvType}; use pineappl::grid::Grid; use pineappl::interpolation::{Interp, InterpMeth, Map, ReweightMeth}; use pineappl::packed_array::PackedArray; -use pineappl::packed_subgrid::PackedQ1X2SubgridV1; +use pineappl::import_subgrid::ImportSubgridV1; use pineappl::pids::PidBasis; use pineappl::subgrid::NodeValues; use std::fs::File; @@ -246,7 +246,7 @@ fn read_fktable(reader: impl BufRead) -> Result { .iter_mut() .zip(arrays.into_iter()) { - *subgrid = PackedQ1X2SubgridV1::new( + *subgrid = ImportSubgridV1::new( array, if hadronic { vec![ @@ -318,7 +318,7 @@ fn read_fktable(reader: impl BufRead) -> Result { .iter_mut() .zip(arrays.into_iter()) { - *subgrid = PackedQ1X2SubgridV1::new( + *subgrid = ImportSubgridV1::new( array, if hadronic { vec![ diff --git a/pineappl_cli/src/subgrids.rs b/pineappl_cli/src/subgrids.rs index e8964d87..e0a76d51 100644 --- a/pineappl_cli/src/subgrids.rs +++ b/pineappl_cli/src/subgrids.rs @@ -80,7 +80,7 @@ impl Subcommand for Opts { match subgrid { SubgridEnum::InterpSubgridV1(_) => "InterpSubgridV1", SubgridEnum::EmptySubgridV1(_) => "EmptySubgridV1", - SubgridEnum::PackedQ1X2SubgridV1(_) => "PackedQ1X2SubgridV1", + SubgridEnum::ImportSubgridV1(_) => "ImportSubgridV1", } )); } diff --git a/pineappl_cli/tests/subgrids.rs b/pineappl_cli/tests/subgrids.rs index f9a2b5b9..77f76020 100644 --- a/pineappl_cli/tests/subgrids.rs +++ b/pineappl_cli/tests/subgrids.rs @@ -235,316 +235,316 @@ const STATS_STR: &str = "o b c total allocated zeros overhead 4 7 4 1444 709 0 76 "; -const TYPE_STR: &str = "o b c type --+-+-+------------------- -0 0 0 PackedQ1X2SubgridV1 -0 1 0 PackedQ1X2SubgridV1 -0 2 0 PackedQ1X2SubgridV1 -0 3 0 PackedQ1X2SubgridV1 -0 4 0 PackedQ1X2SubgridV1 -0 5 0 PackedQ1X2SubgridV1 -0 6 0 PackedQ1X2SubgridV1 -0 7 0 PackedQ1X2SubgridV1 -1 0 0 PackedQ1X2SubgridV1 -1 0 1 PackedQ1X2SubgridV1 -1 0 3 PackedQ1X2SubgridV1 -1 1 0 PackedQ1X2SubgridV1 -1 1 1 PackedQ1X2SubgridV1 -1 1 3 PackedQ1X2SubgridV1 -1 2 0 PackedQ1X2SubgridV1 -1 2 1 PackedQ1X2SubgridV1 -1 2 3 PackedQ1X2SubgridV1 -1 3 0 PackedQ1X2SubgridV1 -1 3 1 PackedQ1X2SubgridV1 -1 3 3 PackedQ1X2SubgridV1 -1 4 0 PackedQ1X2SubgridV1 -1 4 1 PackedQ1X2SubgridV1 -1 4 3 PackedQ1X2SubgridV1 -1 5 0 PackedQ1X2SubgridV1 -1 5 1 PackedQ1X2SubgridV1 -1 5 3 PackedQ1X2SubgridV1 -1 6 0 PackedQ1X2SubgridV1 -1 6 1 PackedQ1X2SubgridV1 -1 6 3 PackedQ1X2SubgridV1 -1 7 0 PackedQ1X2SubgridV1 -1 7 1 PackedQ1X2SubgridV1 -1 7 3 PackedQ1X2SubgridV1 -2 0 0 PackedQ1X2SubgridV1 -2 0 1 PackedQ1X2SubgridV1 -2 0 3 PackedQ1X2SubgridV1 -2 1 0 PackedQ1X2SubgridV1 -2 1 1 PackedQ1X2SubgridV1 -2 1 3 PackedQ1X2SubgridV1 -2 2 0 PackedQ1X2SubgridV1 -2 2 1 PackedQ1X2SubgridV1 -2 2 3 PackedQ1X2SubgridV1 -2 3 0 PackedQ1X2SubgridV1 -2 3 1 PackedQ1X2SubgridV1 -2 3 3 PackedQ1X2SubgridV1 -2 4 0 PackedQ1X2SubgridV1 -2 4 1 PackedQ1X2SubgridV1 -2 4 3 PackedQ1X2SubgridV1 -2 5 0 PackedQ1X2SubgridV1 -2 5 1 PackedQ1X2SubgridV1 -2 5 3 PackedQ1X2SubgridV1 -2 6 0 PackedQ1X2SubgridV1 -2 6 1 PackedQ1X2SubgridV1 -2 6 3 PackedQ1X2SubgridV1 -2 7 0 PackedQ1X2SubgridV1 -2 7 1 PackedQ1X2SubgridV1 -2 7 3 PackedQ1X2SubgridV1 -3 0 0 PackedQ1X2SubgridV1 -3 0 2 PackedQ1X2SubgridV1 -3 0 4 PackedQ1X2SubgridV1 -3 1 0 PackedQ1X2SubgridV1 -3 1 2 PackedQ1X2SubgridV1 -3 1 4 PackedQ1X2SubgridV1 -3 2 0 PackedQ1X2SubgridV1 -3 2 2 PackedQ1X2SubgridV1 -3 2 4 PackedQ1X2SubgridV1 -3 3 0 PackedQ1X2SubgridV1 -3 3 2 PackedQ1X2SubgridV1 -3 3 4 PackedQ1X2SubgridV1 -3 4 0 PackedQ1X2SubgridV1 -3 4 2 PackedQ1X2SubgridV1 -3 4 4 PackedQ1X2SubgridV1 -3 5 0 PackedQ1X2SubgridV1 -3 5 2 PackedQ1X2SubgridV1 -3 5 4 PackedQ1X2SubgridV1 -3 6 0 PackedQ1X2SubgridV1 -3 6 2 PackedQ1X2SubgridV1 -3 6 4 PackedQ1X2SubgridV1 -3 7 0 PackedQ1X2SubgridV1 -3 7 2 PackedQ1X2SubgridV1 -3 7 4 PackedQ1X2SubgridV1 -4 0 0 PackedQ1X2SubgridV1 -4 0 2 PackedQ1X2SubgridV1 -4 0 4 PackedQ1X2SubgridV1 -4 1 0 PackedQ1X2SubgridV1 -4 1 2 PackedQ1X2SubgridV1 -4 1 4 PackedQ1X2SubgridV1 -4 2 0 PackedQ1X2SubgridV1 -4 2 2 PackedQ1X2SubgridV1 -4 2 4 PackedQ1X2SubgridV1 -4 3 0 PackedQ1X2SubgridV1 -4 3 2 PackedQ1X2SubgridV1 -4 3 4 PackedQ1X2SubgridV1 -4 4 0 PackedQ1X2SubgridV1 -4 4 2 PackedQ1X2SubgridV1 -4 4 4 PackedQ1X2SubgridV1 -4 5 0 PackedQ1X2SubgridV1 -4 5 2 PackedQ1X2SubgridV1 -4 5 4 PackedQ1X2SubgridV1 -4 6 0 PackedQ1X2SubgridV1 -4 6 2 PackedQ1X2SubgridV1 -4 6 4 PackedQ1X2SubgridV1 -4 7 0 PackedQ1X2SubgridV1 -4 7 2 PackedQ1X2SubgridV1 -4 7 4 PackedQ1X2SubgridV1 +const TYPE_STR: &str = "o b c type +-+-+-+--------------- +0 0 0 ImportSubgridV1 +0 1 0 ImportSubgridV1 +0 2 0 ImportSubgridV1 +0 3 0 ImportSubgridV1 +0 4 0 ImportSubgridV1 +0 5 0 ImportSubgridV1 +0 6 0 ImportSubgridV1 +0 7 0 ImportSubgridV1 +1 0 0 ImportSubgridV1 +1 0 1 ImportSubgridV1 +1 0 3 ImportSubgridV1 +1 1 0 ImportSubgridV1 +1 1 1 ImportSubgridV1 +1 1 3 ImportSubgridV1 +1 2 0 ImportSubgridV1 +1 2 1 ImportSubgridV1 +1 2 3 ImportSubgridV1 +1 3 0 ImportSubgridV1 +1 3 1 ImportSubgridV1 +1 3 3 ImportSubgridV1 +1 4 0 ImportSubgridV1 +1 4 1 ImportSubgridV1 +1 4 3 ImportSubgridV1 +1 5 0 ImportSubgridV1 +1 5 1 ImportSubgridV1 +1 5 3 ImportSubgridV1 +1 6 0 ImportSubgridV1 +1 6 1 ImportSubgridV1 +1 6 3 ImportSubgridV1 +1 7 0 ImportSubgridV1 +1 7 1 ImportSubgridV1 +1 7 3 ImportSubgridV1 +2 0 0 ImportSubgridV1 +2 0 1 ImportSubgridV1 +2 0 3 ImportSubgridV1 +2 1 0 ImportSubgridV1 +2 1 1 ImportSubgridV1 +2 1 3 ImportSubgridV1 +2 2 0 ImportSubgridV1 +2 2 1 ImportSubgridV1 +2 2 3 ImportSubgridV1 +2 3 0 ImportSubgridV1 +2 3 1 ImportSubgridV1 +2 3 3 ImportSubgridV1 +2 4 0 ImportSubgridV1 +2 4 1 ImportSubgridV1 +2 4 3 ImportSubgridV1 +2 5 0 ImportSubgridV1 +2 5 1 ImportSubgridV1 +2 5 3 ImportSubgridV1 +2 6 0 ImportSubgridV1 +2 6 1 ImportSubgridV1 +2 6 3 ImportSubgridV1 +2 7 0 ImportSubgridV1 +2 7 1 ImportSubgridV1 +2 7 3 ImportSubgridV1 +3 0 0 ImportSubgridV1 +3 0 2 ImportSubgridV1 +3 0 4 ImportSubgridV1 +3 1 0 ImportSubgridV1 +3 1 2 ImportSubgridV1 +3 1 4 ImportSubgridV1 +3 2 0 ImportSubgridV1 +3 2 2 ImportSubgridV1 +3 2 4 ImportSubgridV1 +3 3 0 ImportSubgridV1 +3 3 2 ImportSubgridV1 +3 3 4 ImportSubgridV1 +3 4 0 ImportSubgridV1 +3 4 2 ImportSubgridV1 +3 4 4 ImportSubgridV1 +3 5 0 ImportSubgridV1 +3 5 2 ImportSubgridV1 +3 5 4 ImportSubgridV1 +3 6 0 ImportSubgridV1 +3 6 2 ImportSubgridV1 +3 6 4 ImportSubgridV1 +3 7 0 ImportSubgridV1 +3 7 2 ImportSubgridV1 +3 7 4 ImportSubgridV1 +4 0 0 ImportSubgridV1 +4 0 2 ImportSubgridV1 +4 0 4 ImportSubgridV1 +4 1 0 ImportSubgridV1 +4 1 2 ImportSubgridV1 +4 1 4 ImportSubgridV1 +4 2 0 ImportSubgridV1 +4 2 2 ImportSubgridV1 +4 2 4 ImportSubgridV1 +4 3 0 ImportSubgridV1 +4 3 2 ImportSubgridV1 +4 3 4 ImportSubgridV1 +4 4 0 ImportSubgridV1 +4 4 2 ImportSubgridV1 +4 4 4 ImportSubgridV1 +4 5 0 ImportSubgridV1 +4 5 2 ImportSubgridV1 +4 5 4 ImportSubgridV1 +4 6 0 ImportSubgridV1 +4 6 2 ImportSubgridV1 +4 6 4 ImportSubgridV1 +4 7 0 ImportSubgridV1 +4 7 2 ImportSubgridV1 +4 7 4 ImportSubgridV1 "; -const TYPE_SHOW_EMPTY_STR: &str = "o b c type --+-+-+------------------- -0 0 0 PackedQ1X2SubgridV1 +const TYPE_SHOW_EMPTY_STR: &str = "o b c type +-+-+-+--------------- +0 0 0 ImportSubgridV1 0 0 1 EmptySubgridV1 0 0 2 EmptySubgridV1 0 0 3 EmptySubgridV1 0 0 4 EmptySubgridV1 -0 1 0 PackedQ1X2SubgridV1 +0 1 0 ImportSubgridV1 0 1 1 EmptySubgridV1 0 1 2 EmptySubgridV1 0 1 3 EmptySubgridV1 0 1 4 EmptySubgridV1 -0 2 0 PackedQ1X2SubgridV1 +0 2 0 ImportSubgridV1 0 2 1 EmptySubgridV1 0 2 2 EmptySubgridV1 0 2 3 EmptySubgridV1 0 2 4 EmptySubgridV1 -0 3 0 PackedQ1X2SubgridV1 +0 3 0 ImportSubgridV1 0 3 1 EmptySubgridV1 0 3 2 EmptySubgridV1 0 3 3 EmptySubgridV1 0 3 4 EmptySubgridV1 -0 4 0 PackedQ1X2SubgridV1 +0 4 0 ImportSubgridV1 0 4 1 EmptySubgridV1 0 4 2 EmptySubgridV1 0 4 3 EmptySubgridV1 0 4 4 EmptySubgridV1 -0 5 0 PackedQ1X2SubgridV1 +0 5 0 ImportSubgridV1 0 5 1 EmptySubgridV1 0 5 2 EmptySubgridV1 0 5 3 EmptySubgridV1 0 5 4 EmptySubgridV1 -0 6 0 PackedQ1X2SubgridV1 +0 6 0 ImportSubgridV1 0 6 1 EmptySubgridV1 0 6 2 EmptySubgridV1 0 6 3 EmptySubgridV1 0 6 4 EmptySubgridV1 -0 7 0 PackedQ1X2SubgridV1 +0 7 0 ImportSubgridV1 0 7 1 EmptySubgridV1 0 7 2 EmptySubgridV1 0 7 3 EmptySubgridV1 0 7 4 EmptySubgridV1 -1 0 0 PackedQ1X2SubgridV1 -1 0 1 PackedQ1X2SubgridV1 +1 0 0 ImportSubgridV1 +1 0 1 ImportSubgridV1 1 0 2 EmptySubgridV1 -1 0 3 PackedQ1X2SubgridV1 +1 0 3 ImportSubgridV1 1 0 4 EmptySubgridV1 -1 1 0 PackedQ1X2SubgridV1 -1 1 1 PackedQ1X2SubgridV1 +1 1 0 ImportSubgridV1 +1 1 1 ImportSubgridV1 1 1 2 EmptySubgridV1 -1 1 3 PackedQ1X2SubgridV1 +1 1 3 ImportSubgridV1 1 1 4 EmptySubgridV1 -1 2 0 PackedQ1X2SubgridV1 -1 2 1 PackedQ1X2SubgridV1 +1 2 0 ImportSubgridV1 +1 2 1 ImportSubgridV1 1 2 2 EmptySubgridV1 -1 2 3 PackedQ1X2SubgridV1 +1 2 3 ImportSubgridV1 1 2 4 EmptySubgridV1 -1 3 0 PackedQ1X2SubgridV1 -1 3 1 PackedQ1X2SubgridV1 +1 3 0 ImportSubgridV1 +1 3 1 ImportSubgridV1 1 3 2 EmptySubgridV1 -1 3 3 PackedQ1X2SubgridV1 +1 3 3 ImportSubgridV1 1 3 4 EmptySubgridV1 -1 4 0 PackedQ1X2SubgridV1 -1 4 1 PackedQ1X2SubgridV1 +1 4 0 ImportSubgridV1 +1 4 1 ImportSubgridV1 1 4 2 EmptySubgridV1 -1 4 3 PackedQ1X2SubgridV1 +1 4 3 ImportSubgridV1 1 4 4 EmptySubgridV1 -1 5 0 PackedQ1X2SubgridV1 -1 5 1 PackedQ1X2SubgridV1 +1 5 0 ImportSubgridV1 +1 5 1 ImportSubgridV1 1 5 2 EmptySubgridV1 -1 5 3 PackedQ1X2SubgridV1 +1 5 3 ImportSubgridV1 1 5 4 EmptySubgridV1 -1 6 0 PackedQ1X2SubgridV1 -1 6 1 PackedQ1X2SubgridV1 +1 6 0 ImportSubgridV1 +1 6 1 ImportSubgridV1 1 6 2 EmptySubgridV1 -1 6 3 PackedQ1X2SubgridV1 +1 6 3 ImportSubgridV1 1 6 4 EmptySubgridV1 -1 7 0 PackedQ1X2SubgridV1 -1 7 1 PackedQ1X2SubgridV1 +1 7 0 ImportSubgridV1 +1 7 1 ImportSubgridV1 1 7 2 EmptySubgridV1 -1 7 3 PackedQ1X2SubgridV1 +1 7 3 ImportSubgridV1 1 7 4 EmptySubgridV1 -2 0 0 PackedQ1X2SubgridV1 -2 0 1 PackedQ1X2SubgridV1 +2 0 0 ImportSubgridV1 +2 0 1 ImportSubgridV1 2 0 2 EmptySubgridV1 -2 0 3 PackedQ1X2SubgridV1 +2 0 3 ImportSubgridV1 2 0 4 EmptySubgridV1 -2 1 0 PackedQ1X2SubgridV1 -2 1 1 PackedQ1X2SubgridV1 +2 1 0 ImportSubgridV1 +2 1 1 ImportSubgridV1 2 1 2 EmptySubgridV1 -2 1 3 PackedQ1X2SubgridV1 +2 1 3 ImportSubgridV1 2 1 4 EmptySubgridV1 -2 2 0 PackedQ1X2SubgridV1 -2 2 1 PackedQ1X2SubgridV1 +2 2 0 ImportSubgridV1 +2 2 1 ImportSubgridV1 2 2 2 EmptySubgridV1 -2 2 3 PackedQ1X2SubgridV1 +2 2 3 ImportSubgridV1 2 2 4 EmptySubgridV1 -2 3 0 PackedQ1X2SubgridV1 -2 3 1 PackedQ1X2SubgridV1 +2 3 0 ImportSubgridV1 +2 3 1 ImportSubgridV1 2 3 2 EmptySubgridV1 -2 3 3 PackedQ1X2SubgridV1 +2 3 3 ImportSubgridV1 2 3 4 EmptySubgridV1 -2 4 0 PackedQ1X2SubgridV1 -2 4 1 PackedQ1X2SubgridV1 +2 4 0 ImportSubgridV1 +2 4 1 ImportSubgridV1 2 4 2 EmptySubgridV1 -2 4 3 PackedQ1X2SubgridV1 +2 4 3 ImportSubgridV1 2 4 4 EmptySubgridV1 -2 5 0 PackedQ1X2SubgridV1 -2 5 1 PackedQ1X2SubgridV1 +2 5 0 ImportSubgridV1 +2 5 1 ImportSubgridV1 2 5 2 EmptySubgridV1 -2 5 3 PackedQ1X2SubgridV1 +2 5 3 ImportSubgridV1 2 5 4 EmptySubgridV1 -2 6 0 PackedQ1X2SubgridV1 -2 6 1 PackedQ1X2SubgridV1 +2 6 0 ImportSubgridV1 +2 6 1 ImportSubgridV1 2 6 2 EmptySubgridV1 -2 6 3 PackedQ1X2SubgridV1 +2 6 3 ImportSubgridV1 2 6 4 EmptySubgridV1 -2 7 0 PackedQ1X2SubgridV1 -2 7 1 PackedQ1X2SubgridV1 +2 7 0 ImportSubgridV1 +2 7 1 ImportSubgridV1 2 7 2 EmptySubgridV1 -2 7 3 PackedQ1X2SubgridV1 +2 7 3 ImportSubgridV1 2 7 4 EmptySubgridV1 -3 0 0 PackedQ1X2SubgridV1 +3 0 0 ImportSubgridV1 3 0 1 EmptySubgridV1 -3 0 2 PackedQ1X2SubgridV1 +3 0 2 ImportSubgridV1 3 0 3 EmptySubgridV1 -3 0 4 PackedQ1X2SubgridV1 -3 1 0 PackedQ1X2SubgridV1 +3 0 4 ImportSubgridV1 +3 1 0 ImportSubgridV1 3 1 1 EmptySubgridV1 -3 1 2 PackedQ1X2SubgridV1 +3 1 2 ImportSubgridV1 3 1 3 EmptySubgridV1 -3 1 4 PackedQ1X2SubgridV1 -3 2 0 PackedQ1X2SubgridV1 +3 1 4 ImportSubgridV1 +3 2 0 ImportSubgridV1 3 2 1 EmptySubgridV1 -3 2 2 PackedQ1X2SubgridV1 +3 2 2 ImportSubgridV1 3 2 3 EmptySubgridV1 -3 2 4 PackedQ1X2SubgridV1 -3 3 0 PackedQ1X2SubgridV1 +3 2 4 ImportSubgridV1 +3 3 0 ImportSubgridV1 3 3 1 EmptySubgridV1 -3 3 2 PackedQ1X2SubgridV1 +3 3 2 ImportSubgridV1 3 3 3 EmptySubgridV1 -3 3 4 PackedQ1X2SubgridV1 -3 4 0 PackedQ1X2SubgridV1 +3 3 4 ImportSubgridV1 +3 4 0 ImportSubgridV1 3 4 1 EmptySubgridV1 -3 4 2 PackedQ1X2SubgridV1 +3 4 2 ImportSubgridV1 3 4 3 EmptySubgridV1 -3 4 4 PackedQ1X2SubgridV1 -3 5 0 PackedQ1X2SubgridV1 +3 4 4 ImportSubgridV1 +3 5 0 ImportSubgridV1 3 5 1 EmptySubgridV1 -3 5 2 PackedQ1X2SubgridV1 +3 5 2 ImportSubgridV1 3 5 3 EmptySubgridV1 -3 5 4 PackedQ1X2SubgridV1 -3 6 0 PackedQ1X2SubgridV1 +3 5 4 ImportSubgridV1 +3 6 0 ImportSubgridV1 3 6 1 EmptySubgridV1 -3 6 2 PackedQ1X2SubgridV1 +3 6 2 ImportSubgridV1 3 6 3 EmptySubgridV1 -3 6 4 PackedQ1X2SubgridV1 -3 7 0 PackedQ1X2SubgridV1 +3 6 4 ImportSubgridV1 +3 7 0 ImportSubgridV1 3 7 1 EmptySubgridV1 -3 7 2 PackedQ1X2SubgridV1 +3 7 2 ImportSubgridV1 3 7 3 EmptySubgridV1 -3 7 4 PackedQ1X2SubgridV1 -4 0 0 PackedQ1X2SubgridV1 +3 7 4 ImportSubgridV1 +4 0 0 ImportSubgridV1 4 0 1 EmptySubgridV1 -4 0 2 PackedQ1X2SubgridV1 +4 0 2 ImportSubgridV1 4 0 3 EmptySubgridV1 -4 0 4 PackedQ1X2SubgridV1 -4 1 0 PackedQ1X2SubgridV1 +4 0 4 ImportSubgridV1 +4 1 0 ImportSubgridV1 4 1 1 EmptySubgridV1 -4 1 2 PackedQ1X2SubgridV1 +4 1 2 ImportSubgridV1 4 1 3 EmptySubgridV1 -4 1 4 PackedQ1X2SubgridV1 -4 2 0 PackedQ1X2SubgridV1 +4 1 4 ImportSubgridV1 +4 2 0 ImportSubgridV1 4 2 1 EmptySubgridV1 -4 2 2 PackedQ1X2SubgridV1 +4 2 2 ImportSubgridV1 4 2 3 EmptySubgridV1 -4 2 4 PackedQ1X2SubgridV1 -4 3 0 PackedQ1X2SubgridV1 +4 2 4 ImportSubgridV1 +4 3 0 ImportSubgridV1 4 3 1 EmptySubgridV1 -4 3 2 PackedQ1X2SubgridV1 +4 3 2 ImportSubgridV1 4 3 3 EmptySubgridV1 -4 3 4 PackedQ1X2SubgridV1 -4 4 0 PackedQ1X2SubgridV1 +4 3 4 ImportSubgridV1 +4 4 0 ImportSubgridV1 4 4 1 EmptySubgridV1 -4 4 2 PackedQ1X2SubgridV1 +4 4 2 ImportSubgridV1 4 4 3 EmptySubgridV1 -4 4 4 PackedQ1X2SubgridV1 -4 5 0 PackedQ1X2SubgridV1 +4 4 4 ImportSubgridV1 +4 5 0 ImportSubgridV1 4 5 1 EmptySubgridV1 -4 5 2 PackedQ1X2SubgridV1 +4 5 2 ImportSubgridV1 4 5 3 EmptySubgridV1 -4 5 4 PackedQ1X2SubgridV1 -4 6 0 PackedQ1X2SubgridV1 +4 5 4 ImportSubgridV1 +4 6 0 ImportSubgridV1 4 6 1 EmptySubgridV1 -4 6 2 PackedQ1X2SubgridV1 +4 6 2 ImportSubgridV1 4 6 3 EmptySubgridV1 -4 6 4 PackedQ1X2SubgridV1 -4 7 0 PackedQ1X2SubgridV1 +4 6 4 ImportSubgridV1 +4 7 0 ImportSubgridV1 4 7 1 EmptySubgridV1 -4 7 2 PackedQ1X2SubgridV1 +4 7 2 ImportSubgridV1 4 7 3 EmptySubgridV1 -4 7 4 PackedQ1X2SubgridV1 +4 7 4 ImportSubgridV1 "; const X0_STR: &str = "o b c x0