예제 #1
0
 /// <summary>
 /// Creates a transducer <c>T(a, b) = I[a = ""] I[b[0] in c, |b| = 1]</c>, where <c>c</c> is a given element distribution.
 /// </summary>
 /// <param name="destElementDist">The element distribution to constrain the second transducer argument to.</param>
 /// <returns>The created transducer.</returns>
 public static TThis ProduceElement(TDestElementDistribution destElementDist)
 {
     return(Produce(Automaton <TDestSequence, TDestElement, TDestElementDistribution, TDestSequenceManipulator, TDestAutomaton> .ConstantOnElement(1.0, destElementDist)));
 }
예제 #2
0
 /// <summary>
 /// Creates a transducer <c>T(a, b) = I[a[0] = c, |a| = 1] I[b = ""]</c>, where <c>c</c> is a given element.
 /// </summary>
 /// <param name="srcElement">The element to constrain the first transducer argument to.</param>
 /// <returns>The created transducer.</returns>
 public static TThis ConsumeElement(TSrcElement srcElement)
 {
     return(Consume(Automaton <TSrcSequence, TSrcElement, TSrcElementDistribution, TSrcSequenceManipulator, TSrcAutomaton> .ConstantOnElement(1.0, srcElement)));
 }