h$$ ,      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None-./28<>? SciBaseTypesThe smallest value /= 0 for numeric values. SciBaseTypesNumeric epsilon. SciBaseTypes)The class of limits into the transfinite.  None-./28<>?  SciBaseTypes4The Viterbi SemiRing. It maximizes over the product. SciBaseTypesUnicode variant of srplus. SciBaseTypesUnicode variant of srmul. SciBaseTypes but done n times.3TODO Include into type class to improve performance SciBaseTypes9The tropical MinPlus SemiRing. It minimizes over the sum." SciBaseTypes?R^ SciBaseTypes2A discretized value takes a floating point number n and produces a discretized value. The actual discretization formula is given on the type level, freeing us from having to carry around some scaling function.%Typically, one might use types likes 100,  (100 :% 1), or (RTyLn 2 :% RTyId 2).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.c SciBaseTypes%Some discretizations are of the type ln 2 / 2 (PAM matrices in Blast for example). Using this type, we can annotate as follows: !Discretized (RTyLn 2 :% RTyId 2). One may use Unknown if the scale is not known. For example, the blast matrices use different scales internally and one needs to read the header to get the scale.w SciBaseTypesDiscretizes any Real a into the  Discretized value. This conversion is lossy# and uses a type-level rational of u :% l!^_`abchgfedijwchgfediab^_`jwNone-./28<>? SciBaseTypesInstances for  LogDomain x should be for specific types. SciBaseTypes"The type family to connect a type x with the type Ln x in the log-domain. 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. SciBaseTypesThis is similar to   but requires only one pass over the data. It will be useful if the first two elements in the stream are large. If the user has some control over how the stream is generated, this function might show better performance than  0 and better numeric stability than 'fold 0 (+)'*TODO this needs to be benchmarked against  fold 0 (+) , since in DnaProteinAlignment sumS seems to be slower! SciBaseTypes log-sum-exp for streams, without incurring examining the stream twice, but with the potential for numeric problems. In pricinple, the numeric error of this function should be better than individual binary function application and worse than an optimized sum function.Needs to be written in direct style, as otherwise any constructors (to tell us if we collected two elements already) remain.None-./28<>? SciBaseTypesEncodes 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.Note that these are "explicit" log-odds. Each numeric operation uses the underlying operation on Int). If you want automatic handling, choose  Log Odds. SciBaseTypesOdds. None-./28<>? 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,...,D]. SciBaseTypes-Turns a value into a normalized probability. error# if the value is not in the range  [0,...,1]. SciBaseTypesSimple wrapper around  Probability that fixes non-normalization. SciBaseTypesThis simple function represents probabilities with characters between '0'  0.0 -- 0.05 up to '9'  0.85 -- 0.95 and finally  for >0.95.  None-./28<>?  SciBaseTypesThe state probability functions provide conversion from some types a into non-normalized probabilities. For "real" applications, using the logProbability function is preferred. This functions allows for easy abstraction when types a are given as fractions of some actual value (say: deka-cal), or are discretized.The returned values are not normalized, because we do not now the total evidence Z 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. At some point we want to have type-level physical quantities, hence the need for the second type. SciBaseTypesGiven a temperature and a state "energy", return the corresponding non-normalized probability. SciBaseTypesthis is k*T SciBaseTypes"the energy (or discretized energy) SciBaseTypesprobability of being in state a, but only proportional up to 1/Z. SciBaseTypesthis is  1/(k * T) SciBaseTypes"the energy (or discretized energy) SciBaseTypesresulting probability     !"#$%&'(()*+,-./0123456789:;;<=>?@ABCDEFGHIJKLMNOOPQRSTUVWXYZ[\]^_`abcdeffghijklmnopqrstuvwxyz{|}~+SciBaseTypes-0.1.1.0-3Dyd7liFoDd1V6ph3ZjwIRAlgebra.Structure.SemiringNumeric.LimitsNumeric.DiscretizedNumeric.LogDomainStatistics.OddsStatistics.ProbabilityStatisticalMechanics.Ensemble Numeric.Logsum$semirings-0.6-1eUTmE10tfCJMsgBmupnwk Data.Semiring fromNaturalonetimeszeroplusSemiringNumericEpsilonepsilon NumericLimits minFinite maxFinite$fNumericLimitsDouble$fNumericLimitsInt$fNumericLimitsWord$fNumericEpsilonDoubleViterbi getViterbi⊕⊗nTimes $fEqViterbi $fOrdViterbi $fReadViterbi $fShowViterbi$fBoundedViterbi$fGenericViterbi$fGeneric1TYPEViterbi $fNumViterbiMinPlus getMinPlus V_Viterbi MV_Viterbi$fSemiringViterbi$fFromJSONViterbi$fToJSONViterbi$fNFDataViterbi$fVectorVectorViterbi$fMVectorMVectorViterbi$fUnboxViterbi $fEqMinPlus $fOrdMinPlus $fReadMinPlus $fShowMinPlus$fBoundedMinPlus$fGenericMinPlus$fGeneric1TYPEMinPlus $fNumMinPlusMaxPlus getMaxPlus V_MinPlus MV_MinPlus$fSemiringMinPlus$fNumericLimitsMinPlus$fFromJSONMinPlus$fToJSONMinPlus$fNFDataMinPlus$fVectorVectorMinPlus$fMVectorMVectorMinPlus$fUnboxMinPlus $fEqMaxPlus $fOrdMaxPlus $fReadMaxPlus $fShowMaxPlus$fBoundedMaxPlus$fGenericMaxPlus$fGeneric1TYPEMaxPlus $fNumMaxPlus GSemiring getSemiring V_MaxPlus MV_MaxPlus $fSemiringLog$fSemiringMaxPlus $fInfoMaxPlus$fNumericLimitsMaxPlus$fFromJSONMaxPlus$fToJSONMaxPlus$fNFDataMaxPlus$fVectorVectorMaxPlus$fMVectorMVectorMaxPlus$fUnboxMaxPlus$fSemiringGSemiring$fFromJSONGSemiring$fToJSONGSemiring$fNFDataGSemiring $fEqGSemiring$fOrdGSemiring$fReadGSemiring$fShowGSemiring$fGenericGSemiring DiscretizedgetDiscretizedRatioTyConstantratioTyConstantRatioTyRTyExpRTyIdRTyLnRTyPlusRTyTimesUnknown fromUnknown $fRatioTyConstantRatioTyRTyTimes$fRatioTyConstantRatioTyRTyPlus$fRatioTyConstantRatioTyRTyLn$fRatioTyConstantRatioTyRTyId$fRatioTyConstantRatioTyRTyExp$fRatioTyConstantRatio:%$fInfoDiscretized$fShowDiscretized$fEqDiscretized$fOrdDiscretized$fGenericDiscretized$fReadDiscretizeddiscretizeRatio$fNumericLimitsDiscretized$fSemiringDiscretized$fRealDiscretized$fFractionalDiscretized$fEnumDiscretized$fNumDiscretized$fNumDiscretized0$fFromJSONDiscretized$fToJSONDiscretized$fHashableDiscretized$fSerializeDiscretized$fBinaryDiscretized$fNFDataDiscretized$fVectorVectorDiscretized$fMVectorMVectorDiscretized$fUnboxDiscretized LogDomainLnlogdom unsafelogdomlindomsumS logsumexpS$fLogDomainDouble DiscLogOddsgetDiscLogOddsOddsgetOdds $fNFDataOdds$fGenericDiscLogOdds$fEqDiscLogOdds$fOrdDiscLogOdds$fShowDiscLogOdds$fReadDiscLogOdds $fGenericOdds$fEqOdds $fOrdOdds $fShowOdds $fReadOdds $fNumOdds$fRealDiscLogOdds$fFractionalDiscLogOdds$fSemiringDiscLogOdds$fNumDiscLogOdds$fSemiringOdds$fInfoDiscLogOdds$fNumericLimitsDiscLogOdds$fNFDataDiscLogOdds$fFromJSONDiscLogOdds$fToJSONDiscLogOdds$fHashableDiscLogOdds$fSerializeDiscLogOdds$fBinaryDiscLogOdds$fVectorVectorDiscLogOdds$fMVectorMVectorDiscLogOdds$fUnboxDiscLogOdds ProbabilityProbgetProb IsNormalized Normalized NotNormalized$fNFDataProbability$fEqProbability$fOrdProbability$fShowProbability$fReadProbability$fGenericProbabilityprobprob'probabilityToChar$fSemiringProbability$fFromJSONProbability$fToJSONProbability$fVectorVectorProbability$fMVectorMVectorProbability$fUnboxProbability$fRealFloatProbability$fRealFracProbability$fRealProbability$fFloatingProbability$fFractionalProbability$fNumProbability$fEnumProbabilityStateProbabilitystateProbabilitystateLogProbability$fStateProbabilityDoublebaseGHC.Base SemigroupMonoidghc-prim GHC.TypesIntGHC.ShowShow&vector-0.12.3.0-Iq8W8y7X87B1xSQfAcXis3Data.Vector.Unboxed.BaseVector V_DiscretizedMVectorMV_DiscretizedV_DiscretizedLogOddsMV_DiscretizedLogOddsGHC.Num* V_ProbabilityMV_Probability