Exemple #1
0
        /// <summary>
        /// Creates a transducer <c>T(a, b) = I[a = A] I[b = B]</c>, where <c>A</c> and <c>B</c> are given sequences.
        /// </summary>
        /// <param name="srcSequence">The sequence to constrain the first transducer argument to.</param>
        /// <param name="destSequence">The sequence to constrain the second transducer argument to.</param>
        /// <returns>The created transducer.</returns>
        public static TThis Replace(TSrcSequence srcSequence, TDestSequence destSequence)
        {
            Argument.CheckIfNotNull(srcSequence, "srcSequence");
            Argument.CheckIfNotNull(destSequence, "destSequence");

            return(Replace(
                       Automaton <TSrcSequence, TSrcElement, TSrcElementDistribution, TSrcSequenceManipulator, TSrcAutomaton> .ConstantOn(1.0, srcSequence),
                       Automaton <TDestSequence, TDestElement, TDestElementDistribution, TDestSequenceManipulator, TDestAutomaton> .ConstantOn(1.0, destSequence)));
        }
Exemple #2
0
 /// <summary>
 /// Creates a transducer <c>T(a, b) = I[a = A] I[b = ""]</c>, where <c>A</c> is a given sequence.
 /// </summary>
 /// <param name="srcSequence">The sequence to constrain the first transducer argument to.</param>
 /// <returns>The created transducer.</returns>
 public static TThis Consume(TSrcSequence srcSequence)
 {
     return(Consume(Automaton <TSrcSequence, TSrcElement, TSrcElementDistribution, TSrcSequenceManipulator, TSrcAutomaton> .ConstantOn(1.0, srcSequence)));
 }
Exemple #3
0
 /// <summary>
 /// Creates a transducer <c>T(a, b) = I[a = ""] I[b = B]</c>, where <c>B</c> is a given sequence.
 /// </summary>
 /// <param name="destSequence">The sequence to constrain the second transducer argument to.</param>
 /// <returns>The created transducer.</returns>
 public static TThis Produce(TDestSequence destSequence)
 {
     return(Produce(Automaton <TDestSequence, TDestElement, TDestElementDistribution, TDestSequenceManipulator, TDestAutomaton> .ConstantOn(1.0, destSequence)));
 }