Exemplo n.º 1
0
                /// <inheritdoc/>
                public MultiRepresentationWeightFunction <TDictionary> ConstantLog(double logValue, TElementDistribution allowedElements)
                {
                    if (double.IsNegativeInfinity(allowedElements.GetLogAverageOf(allowedElements)))
                    {
                        return(Zero());
                    }
                    var automaton = Automaton <TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton> .ConstantLog(logValue, allowedElements);

                    return(FromAutomaton(automaton));
                }
Exemplo n.º 2
0
                public MultiRepresentationWeightFunction <TDictionary> ConstantLog(double logValue, TElementDistribution allowedElements)
                {
                    if (double.IsNegativeInfinity(allowedElements.GetLogAverageOf(allowedElements)))
                    {
                        return(Zero());
                    }
                    var automaton = new TAutomaton();

                    automaton.SetToConstantLog(logValue, allowedElements);
                    return(FromAutomaton(automaton));
                }