@@ -53,17 +53,17 @@ A `DeckTransformationGroup` is the result of deck transformations computation.
5353struct DeckTransformationGroup
5454 maps:: Vector{DeckTransformation}
5555 group:: GapObj
56- F:: SampledSystem
56+ F:: SampledParametricSystem
5757end
5858
59- function DeckTransformationGroup (F:: SampledSystem )
59+ function DeckTransformationGroup (F:: SampledParametricSystem )
6060 symmetries = _init_symmetries (length (deck_permutations (F)), unknowns (F))
6161 return DeckTransformationGroup (symmetries, F)
6262end
6363
6464function DeckTransformationGroup (
6565 symmetries:: Vector{Vector{MiExpression}} ,
66- F:: SampledSystem
66+ F:: SampledParametricSystem
6767)
6868 action = [DeckTransformation (symmetry, unknowns (F), parameters (F)) for symmetry in symmetries]
6969 return DeckTransformationGroup (action, to_group (deck_permutations (F)), F)
386386# end
387387
388388function _sample_for_deck_computation (
389- F:: SampledSystem ;
389+ F:: SampledParametricSystem ;
390390 n_instances:: Int
391391)
392392 Δ_ninstances = n_instances - ninstances (F)
@@ -396,7 +396,7 @@ function _sample_for_deck_computation(
396396end
397397
398398function symmetries_fixing_parameters_graded! (
399- F:: SampledSystem ,
399+ F:: SampledParametricSystem ,
400400 grading:: Grading ;
401401 degree_bound:: Integer = 1 ,
402402 param_dep:: Bool = true ,
@@ -477,7 +477,7 @@ function symmetries_fixing_parameters_graded!(
477477end
478478
479479function symmetries_fixing_parameters_dense! (
480- F:: SampledSystem ;
480+ F:: SampledParametricSystem ;
481481 degree_bound:: Integer = 1 ,
482482 param_dep:: Bool = true ,
483483 tols:: Tolerances = Tolerances (),
@@ -546,7 +546,7 @@ to_CC(scaling::Tuple{Tv, SparseVector{Tv,Ti}}) where {Tv<:Integer,Ti<:Integer} =
546546function _deck_action (
547547 deck_permutation:: Vector{Int} ,
548548 (x₀, p₀):: NTuple{2, AbstractVector{<:Number}} ,
549- F:: SampledSystem ;
549+ F:: SampledParametricSystem ;
550550 tol:: Real = 1e-5
551551)
552552 sols, params = all_solutions_samples (F). solutions, all_solutions_samples (F). parameters
565565function _deck_commutes_with_scaling (
566566 deck_permutation:: Vector{Int} ,
567567 scaling:: Tuple{Tv, SparseVector{Tv,Ti}} ,
568- F:: SampledSystem ;
568+ F:: SampledParametricSystem ;
569569 tol:: Real = 1e-5
570570) where {Tv<: Integer ,Ti<: Integer }
571571
@@ -584,7 +584,7 @@ function _deck_commutes_with_scaling(
584584end
585585
586586function _all_deck_commute (
587- F:: SampledSystem ,
587+ F:: SampledParametricSystem ,
588588 scaling:: Tuple{Tv, SparseVector{Tv, Ti}} ;
589589 tol:: Real = 1e-5
590590) where {Tv<: Integer ,Ti<: Integer }
@@ -597,10 +597,13 @@ function _all_deck_commute(
597597 return true
598598end
599599
600- function _scalings_commuting_with_deck (F:: SampledSystem , scalings:: ScalingGroup )
601- grading = scalings. grading
602- final_grading = Grading {Int8, Int16} (nfree (grading), grading. free_part, [])
603- for (sᵢ, Uᵢ) in grading. mod_part
600+ function _scalings_commuting_with_deck (F:: SampledParametricSystem , scalings:: ScalingGroup )
601+ if isempty (grading (scalings))
602+ return scalings
603+ end
604+ grding = scalings. grading
605+ final_grading = Grading {Int8, Int16} (nfree (grding), grding. free_part, [])
606+ for (sᵢ, Uᵢ) in grding. mod_part
604607 Vᵢ = Array {Int} (undef, 0 , size (Uᵢ, 2 ))
605608 # TODO : Uᵢ ↦ all linear combinations of rows of Uᵢ (might not commute with 2 gens, but commutes with their combination)
606609 for j in axes (Uᵢ, 1 )
@@ -616,7 +619,7 @@ function _scalings_commuting_with_deck(F::SampledSystem, scalings::ScalingGroup)
616619end
617620
618621function symmetries_fixing_parameters! (
619- F:: SampledSystem ;
622+ F:: SampledParametricSystem ;
620623 degree_bound:: Integer = 1 ,
621624 param_dep:: Bool = true ,
622625 tols:: Tolerances = Tolerances (),
@@ -627,7 +630,8 @@ function symmetries_fixing_parameters!(
627630 return DeckTransformationGroup (F)
628631 end
629632
630- scalings = _scalings_commuting_with_deck (F, scaling_symmetries (F))
633+ scalings = scaling_symmetries (F)
634+ scalings = _scalings_commuting_with_deck (F, scalings)
631635 # scalings = param_dep ? scalings : restrict_scalings(scalings, unknowns(F)) # TODO : justify!
632636 if isempty (grading (scalings))
633637 logging && printstyled (" Running dense version...\n " , color= :green )
@@ -726,7 +730,7 @@ function reduced_nullspace(A::AbstractMatrix{<:Number}; tols::Tolerances=Toleran
726730end
727731
728732function deck_vandermonde_dense (
729- F:: SampledSystem ;
733+ F:: SampledParametricSystem ;
730734 deck_id:: Int ,
731735 var:: Variable ,
732736 degree:: Integer = 1 ,
@@ -765,7 +769,7 @@ function to_multiexponent(mon::Expression, vars::Vector{Variable})
765769end
766770
767771function deck_vandermonde_graded (
768- F:: SampledSystem ,
772+ F:: SampledParametricSystem ,
769773 grading:: Grading ;
770774 deck_id:: Int ,
771775 var:: Variable ,
0 commit comments