Safe Haskell | None |
---|---|
Language | Haskell2010 |
Infinite lazy partition tables (used for caching).
We cache almost all computations (which would be otherwise typically executed many times); this really helps performance.
Synopsis
- newtype PTable a = PTable (Map Partition a)
- createPTable :: (Partition -> a) -> Int -> PTable a
- lookupPTable :: Partition -> PTable a -> a
- newtype PSeries a = PSeries [PTable a]
- createPSeries :: (Partition -> a) -> PSeries a
- lookupPSeries :: Partition -> PSeries a -> a
- newtype SetPTable a = SetPTable (Map SetPartition a)
- createSetPTable :: (SetPartition -> a) -> Int -> SetPTable a
- lookupSetPTable :: SetPartition -> SetPTable a -> a
- newtype SetPSeries a = SetPSeries [SetPTable a]
- createSetPSeries :: (SetPartition -> a) -> SetPSeries a
- lookupSetPSeries :: SetPartition -> SetPSeries a -> a
- polyCache1 :: CacheKey key => (forall base. ChernBase base => key -> f base) -> forall base. ChernBase base => key -> f base
- polyCache2 :: CacheKey key => (forall base. ChernBase base => key -> f (g base)) -> forall base. ChernBase base => key -> f (g base)
- polyCache3 :: CacheKey key => (forall base. ChernBase base => key -> f (g (h base))) -> forall base. ChernBase base => key -> f (g (h base))
- class CacheKey key where
- monoCache :: (key -> a) -> key -> a
- pcache :: (Partition -> a) -> Partition -> a
- setpcache :: (SetPartition -> a) -> SetPartition -> a
- icache :: (Int -> a) -> Int -> a
- icache' :: a -> Int -> (Int -> a) -> Int -> a
Finite lazy partition tables
lookupPTable :: Partition -> PTable a -> a Source #
Infinite lazy partition tables
createPSeries :: (Partition -> a) -> PSeries a Source #
lookupPSeries :: Partition -> PSeries a -> a Source #
Finite lazy set-partition tables
createSetPTable :: (SetPartition -> a) -> Int -> SetPTable a Source #
lookupSetPTable :: SetPartition -> SetPTable a -> a Source #
Infinite lazy set-partition tables
newtype SetPSeries a Source #
SetPSeries [SetPTable a] |
createSetPSeries :: (SetPartition -> a) -> SetPSeries a Source #
lookupSetPSeries :: SetPartition -> SetPSeries a -> a Source #
polymorphic caching
monomorphic caching
class CacheKey key where Source #
Instances
CacheKey Int Source # | |
CacheKey SetPartition Source # | |
Defined in Math.RootLoci.Misc.PTable monoCache :: (SetPartition -> a) -> SetPartition -> a Source # | |
CacheKey Partition Source # | |
individual caching functions
setpcache :: (SetPartition -> a) -> SetPartition -> a Source #