canon 0.1.0.3 → 0.1.0.4
raw patch · 4 files changed
+17/−7 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Math.NumberTheory.Canon: cmLookup :: CR_ -> CycloMap -> Maybe CycloPair
- Math.NumberTheory.Canon: fromCycloMap :: CycloMap -> CycloMapInternal
- Math.NumberTheory.Canon.AurifCyclo: cmLookup :: CR_ -> CycloMap -> Maybe CycloPair
- Math.NumberTheory.Canon.AurifCyclo: fromCycloMap :: CycloMap -> CycloMapInternal
+ Math.NumberTheory.Canon: getIntegerBasedCycloMap :: CycloMap -> Map Integer CycloPair
+ Math.NumberTheory.Canon.AurifCyclo: getIntegerBasedCycloMap :: CycloMap -> Map Integer CycloPair
Files
- Changes +6/−0
- Math/NumberTheory/Canon.hs +1/−1
- Math/NumberTheory/Canon/AurifCyclo.hs +9/−5
- canon.cabal +1/−1
Changes view
@@ -1,3 +1,9 @@+0.1.0.4:+ AurifCyclo.hs: Remove fromCycloMap, cmLookup from API and remove fromCycloMap function.+ Add exposed function getIntegerCycloMap.+ Correct comment for crCycloInitMap + Canon.hs: API change: Update set of functions exposed from AurifCyclo (in accordance with the above).+ 0.1.0.3: The Internals.hs and Additive.hs modules are no longer exposed.
Math/NumberTheory/Canon.hs view
@@ -30,7 +30,7 @@ getBases, getExponents, getElements, cNumDivisors, cTau, cDivisors, cNthDivisor, cWhichDivisor, - CycloMap, fromCycloMap, cmLookup, showCyclo, crCycloInitMap -- Exposes cyclotomic map-related functionality from AurifCyclo+ CycloMap, getIntegerBasedCycloMap, showCyclo, crCycloInitMap -- Exposes cyclotomic map-related functionality from AurifCyclo ) where
Math/NumberTheory/Canon/AurifCyclo.hs view
@@ -18,7 +18,7 @@ chineseAurif, chineseAurifWithMap, crCycloAurifApply, applyCrCycloPair, divvy,- CycloMap, fromCycloMap, cmLookup, showCyclo, crCycloInitMap+ CycloMap, getIntegerBasedCycloMap, showCyclo, crCycloInitMap ) where @@ -252,18 +252,22 @@ newtype CycloMap = MakeCM CycloMapInternal deriving (Eq, Show) -- | Unwrap the CycloMap newtype.-fromCM, fromCycloMap :: CycloMap -> CycloMapInternal+fromCM :: CycloMap -> CycloMapInternal fromCM (MakeCM cm) = cm-fromCycloMap = fromCM --- | This is an initial map with the cyclotomic polynomials for 1 and 2.+-- | Unwrap the CycloMap and convert the internal canon rep keys to Integers, returning a "raw" map+getIntegerBasedCycloMap :: CycloMap -> M.Map Integer CycloPair+getIntegerBasedCycloMap cm = M.mapKeys crToI (fromCM cm)++-- | This is an initial map with the cyclotomic polynomials for 1. crCycloInitMap :: CycloMap crCycloInitMap = MakeCM $ M.insert cr1 (1, poly LE ([-1.0, 1.0] :: [Float])) M.empty --- Two internal functions for the map internals+-- | Wrapper function to query map internals cmLookup :: CR_ -> CycloMap -> Maybe CycloPair cmLookup c m = M.lookup c (fromCM m) +-- Internal function for updating map internals cmInsert :: CR_ -> CycloPair -> CycloMap -> CycloMap cmInsert c p m = MakeCM $ M.insert c p (fromCM m)
canon.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/ name: canon-version: 0.1.0.3+version: 0.1.0.4 synopsis: Massive Number Arithmetic description: This library allows one to manipulate numbers of practically unlimited size by keeping them in factored "canonical" form, where possible. For manipulating sums and differences, there is additional code to factor expressions of special forms.