Example #1
0
 public RowRecogPartitionStateRepo MakeSingle(
     RowRecogPreviousStrategyImpl prevGetter,
     AgentInstanceContext agentInstanceContext,
     RowRecogNFAView view,
     bool keepScheduleState,
     RowRecogPartitionTerminationStateComparator terminationStateCompare)
 {
     return new RowRecogPartitionStateRepoNoGroup(prevGetter, keepScheduleState, terminationStateCompare);
 }
 public RowRecogPartitionStateRepoNoGroup(
     RowRecogPreviousStrategyImpl getter,
     bool keepScheduleState,
     RowRecogPartitionTerminationStateComparator terminationStateCompare)
 {
     singletonState = new RowRecogPartitionStateImpl(getter, new List<RowRecogNFAStateEntry>());
     optionalIntervalSchedules = keepScheduleState
         ? new RowRecogPartitionStateRepoScheduleStateImpl(terminationStateCompare)
         : null;
 }
        /// <summary>
        ///     Ctor.
        /// </summary>
        /// <param name="getter">for "prev" access</param>
        /// <param name="currentStates">existing state</param>
        /// <param name="optionalKeys">partition keys if any</param>
        public RowRecogPartitionStateImpl(
            RowRecogPreviousStrategyImpl getter,
            IList<RowRecogNFAStateEntry> currentStates,
            object optionalKeys)
        {
            if (getter != null) {
                RandomAccess = new RowRecogStateRandomAccessImpl(getter);
            }

            CurrentStatesForPrint = currentStates;
            OptionalKeys = optionalKeys;
        }
 public RowRecogPartitionStateRepoGroup(
     RowRecogPreviousStrategyImpl getter,
     RowRecogPartitionStateRepoGroupMeta meta,
     bool keepScheduleState,
     RowRecogPartitionTerminationStateComparator terminationStateCompare)
 {
     _getter = getter;
     _meta = meta;
     _states = new Dictionary<object, RowRecogPartitionStateImpl>();
     _optionalIntervalSchedules = keepScheduleState
         ? new RowRecogPartitionStateRepoScheduleStateImpl(terminationStateCompare)
         : null;
 }
Example #5
0
        /// <summary>
        ///     Ctor.
        /// </summary>
        /// <param name="getter">for access</param>
        public RowRecogStateRandomAccessImpl(RowRecogPreviousStrategyImpl getter)
        {
            this.getter = getter;

            // Construct a rolling buffer of new data for holding max index + 1 (position 1 requires 2 events to keep)
            newEvents = new RollingEventBuffer(getter.MaxPriorIndex + 1);
            if (!getter.IsUnbound()) {
                priorEventMap = new Dictionary<EventBean, EventBean[]>();
            }
            else {
                priorEventMap = null;
            }
        }
 /// <summary>
 ///     Ctor.
 /// </summary>
 /// <param name="getter">for "prev" access</param>
 /// <param name="currentStates">existing state</param>
 public RowRecogPartitionStateImpl(
     RowRecogPreviousStrategyImpl getter,
     IList<RowRecogNFAStateEntry> currentStates)
     : this(getter, currentStates, null)
 {
 }