úÎ!]ðTĢ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒNone,-.17>@ADHMPSVXkŌ SciBaseTypes2A discretized value takes a floating point number n and produces $n * fromIntegral l / fromIntegral u where both u and l are given as TypeLits. I.e. a scaling factor of  (u  l) = (1  100)/ does all calculations in subdivisions of 100.The main use of a & value is to enable calculations with Ģ9 while somewhat pretending to use floating point values.(Be careful with certain operations like (*)> as they will easily cause the numbers to arbitrarily wrong. (+) and (-) are fine, however.…NOTE Export and import of data is in the form of floating points, which can lead to additional loss of precision if one is careless! TODO fast Ī methods required!TODO blaze stuff?!TODO We might want to discretize  LogDomain– style values. This requires some thought on in which direction to wrap. Maybe, we want to log-domain Discretized values, which probably just works. SciBaseTypesDiscretizes any Real a into the  Discretized value. This conversion is lossy!None,-.17>@ADHMPSVXk% SciBaseTypesThe smallest value /= 0 for numeric values. SciBaseTypesNumeric epsilon. SciBaseTypes)The class of limits into the transfinite.None,-.17>@ADHMPSVXk.ũ  SciBaseTypes4The Viterbi SemiRing. It maximizes over the product. SciBaseTypes-The semiring operations and neutral elements. SciBaseTypesUnicode variant of srplus.  SciBaseTypesUnicode variant of srmul.) SciBaseTypes9The tropical MinPlus SemiRing. It minimizes over the sum., SciBaseTypes<TODO Shall we have generic instances, or specific ones like SemiRing (Viterbi Prob)?"TODO Consider either a constraint  ProbLike x or the above.9 SciBaseTypes9The tropical MaxPlus SemiRing. It maximizes over the sum.< SciBaseTypes<TODO Shall we have generic instances, or specific ones like SemiRing (Viterbi Prob)?"TODO Consider either a constraint  ProbLike x or the above.I SciBaseTypes'The generic semiring, defined over two Ĩ and Ķ constructions.It can be used like this: U srzero "7 GSemiRing Min Sum Int == maxBound srone "7 GSemiRing Min Sum Int == 0 BIt is generally useful to still provide explicit instances, since Min requires a Bounded instance.L SciBaseTypes<TODO Shall we have generic instances, or specific ones like SemiRing (Viterbi Prob)?"TODO Consider either a constraint  ProbLike x or the above.§ĻĐŠŦŽ­Ū )*+9:;IJK )*+9:;IJK676 7None,-.17>@ADHMPSVXk7OX SciBaseTypesInstances for  LogDomain x should be for specific types.Y SciBaseTypes"The data family to connect a type x with the type Ln x in the log-domain.Z SciBaseTypesTransport a value in x into the log-domain. logdom should throw an exception if log x is not valid.[ SciBaseTypes)Unsafely transport x into the log-domain.\ SciBaseTypesTransport a value Ln x back into the linear domain x.X\[ZYX\[ZYNone,-.17>@ADHMPSVXkCē] SciBaseTypesCThe state probability functions provide conversion from some types aI into non-normalized probabilities. For "real" applications, using the logProbabilityO function is preferred. This functions allows for easy abstraction when types aR are given as fractions of some actual value (say: deka-cal), or are discretized.RThe returned values are not normalized, because we do not now the total evidence Zb until integration over all states has happened -- which is not feasible in a number of problems. TODO replace ()2 with temperature and results with non-normalized P or LogP , depending.^ SciBaseTypes_Given a temperature and a state "energy", return the corresponding non-normalized probability.]_^]_^None,-.17>@ADHMPSVXkIŪ` SciBaseTypesĐEncodes log-odds that have been rounded or clamped to integral numbers. One advantage this provides is more efficient "maximum/minimum" calculations compared to using Doubles.bNote that these are "explicit" log-odds. Each numeric operation uses the underlying operation on Int.c SciBaseTypesOdds. §ŊŦ°`abcdecde`abNone,-.17>@ADHMPSVXkSf| SciBaseTypesProb wraps a Double that encodes probabilities. If Prob is tagged as  Normalized(, the contained values are in the range  [0,...,1]#, otherwise they are in the range  [0,...,"].‰ SciBaseTypes-Turns a value into a normalized probability. error# if the value is not in the range  [0,...,1].Š SciBaseTypesSimple wrapper around Prob that fixes non-normalization.› SciBaseTypes&Turn probability into log-probability.œ SciBaseTypes&Turn log-probability into probability. SciBaseTypesAn isomorphism between Prob and LogProb.§ąēŦģī|}~€†‡ˆ‰Š™š›œ€|}~‰Š†‡ˆ™š›œĩ      !"#$%&'()*+,-.//0123456789:;<=>>?@ABCDEFGHIJKLMMNOPQRSTUVWXYZ[\]^_`abccdeefghijklmnopqrstuvwxyz{|}}~€‚ƒ„…††‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĨĻĐĨĻŠŦŽ­ŪŊ°ŦŽąēģīĩķ·ļđšŧ*SciBaseTypes-0.0.0.1-MnwemAw82XA41vuhv62aHNumeric.DiscretizedNumeric.LimitsAlgebra.Structure.SemiRingNumeric.LogDomainStatisticalMechanics.EnsembleStatistics.OddsStatistics.Probability DiscretizedgetDiscretized discretize$fRealDiscretized$fFractionalDiscretized$fIntegralDiscretized$fEnumDiscretized$fNumDiscretized$fEqDiscretized$fOrdDiscretized$fGenericDiscretized$fShowDiscretized$fReadDiscretizedNumericEpsilonepsilon NumericLimits minFinite maxFinite$fNumericLimitsDouble$fNumericLimitsInt$fNumericLimitsWord$fNumericEpsilonDoubleViterbi getViterbiSemiRingsrplussrmulsrzerosrone⊕⊗ $fEqViterbi $fOrdViterbi $fReadViterbi $fShowViterbi$fBoundedViterbi$fGenericViterbi$fGeneric1Viterbi $fNumViterbiMinPlus getMinPlus$fSemiRingViterbi$fNFDataViterbi$fVectorVectorViterbi$fMVectorMVectorViterbi$fUnboxViterbi $fEqMinPlus $fOrdMinPlus $fReadMinPlus $fShowMinPlus$fBoundedMinPlus$fGenericMinPlus$fGeneric1MinPlus $fNumMinPlusMaxPlus getMaxPlus$fSemiRingMinPlus$fNFDataMinPlus$fVectorVectorMinPlus$fMVectorMVectorMinPlus$fUnboxMinPlus $fEqMaxPlus $fOrdMaxPlus $fReadMaxPlus $fShowMaxPlus$fBoundedMaxPlus$fGenericMaxPlus$fGeneric1MaxPlus $fNumMaxPlus GSemiRing getSemiRing$fSemiRingMaxPlus$fNumericLimitsMaxPlus$fNFDataMaxPlus$fVectorVectorMaxPlus$fMVectorMVectorMaxPlus$fUnboxMaxPlus$fSemiRingGSemiRing $fEqGSemiRing$fOrdGSemiRing$fReadGSemiRing$fShowGSemiRing$fGenericGSemiRing LogDomainLnlogdom unsafelogdomlindomStateProbabilitystateProbabilitystateLogProbability DiscLogOddsgetDiscLogOddsOddsgetOdds $fGenericOdds$fEqOdds $fOrdOdds $fShowOdds $fReadOdds $fNumOdds$fGenericDiscLogOdds$fEqDiscLogOdds$fOrdDiscLogOdds$fShowDiscLogOdds$fReadDiscLogOdds$fNumDiscLogOdds$fNumericLimitsDiscLogOdds$fNFDataDiscLogOdds$fHashableDiscLogOdds$fToJSONDiscLogOdds$fFromJSONDiscLogOdds$fSerializeDiscLogOdds$fBinaryDiscLogOdds$fVectorVectorDiscLogOdds$fMVectorMVectorDiscLogOdds$fUnboxDiscLogOddsProbgetProb IsNormalized Normalized NotNormalized$fEqProb $fOrdProb $fShowProb $fReadProbLogProb getLogProbprobprob'$fSemiRingProb$fVectorVectorProb$fMVectorMVectorProb $fUnboxProb $fEqLogProb $fOrdLogProb $fShowLogProb$fRealFloatProb$fRealFracProb $fRealProb$fFloatingProb$fFractionalProb $fNumProb $fEnumProbwithLog1withLog2p2lplp2paslp$fNumericLimitsLogProb $fNumLogProb$fVectorVectorLogProb$fMVectorMVectorLogProb$fUnboxLogProbghc-prim GHC.TypesIntbaseGHC.ShowShowGHC.Base SemigroupMonoid&vector-0.12.0.2-H1Eu1OCXL0L9y980iV8EwUData.Vector.Unboxed.BaseVector V_Viterbi V_MaxPlus V_MinPlusMVector MV_Viterbi MV_MaxPlus MV_MinPlusV_DiscretizedLogOddsMV_DiscretizedLogOddsV_Prob V_LogProbMV_Prob MV_LogProb