From 72aaa08677777e76cef0433802abc53cd7f4bce3 Mon Sep 17 00:00:00 2001 From: Jeshiba Date: Mon, 17 Jul 2017 07:59:18 -0400 Subject: check pint --- Math/Combinatorics/PitmanTransform.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Math/Combinatorics/PitmanTransform.hs') diff --git a/Math/Combinatorics/PitmanTransform.hs b/Math/Combinatorics/PitmanTransform.hs index e6eea85..0379bce 100644 --- a/Math/Combinatorics/PitmanTransform.hs +++ b/Math/Combinatorics/PitmanTransform.hs @@ -15,6 +15,7 @@ import RobinsonSchensted import Math.Algebra.Field.Base (Q)-- for Q import Math.Algebra.LinearAlgebra import Prelude hiding ( (*>), Word ) +import Test.QuickCheck import qualified Data.List as L --pitman :: (Fractional a, Ord a) => Type -> Int -> [a] -> [a] @@ -65,3 +66,11 @@ gTPFromInt (GTP xs) = GTP $ fmap (fmap fromIntegral) xs prop_Pitman_RobinsonSchensted_sanitise :: [Int] -> Word Int prop_Pitman_RobinsonSchensted_sanitise = W . (fmap (\t -> abs t + 1)) + + +randomQMatrix :: Int -> Gen [[Q]] +randomQMatrix n = vectorOf 20 (vector n) + +prop_Pitman_WeylChamber :: Int -> Property +prop_Pitman_WeylChamber m = let (t, n) = int2TypeInt m in + forAll (randomQMatrix $ dimensionOfHostSpace t n) (\xs -> isInWeylChamber $ pitman t n xs) -- cgit v1.2.3