Esempio n. 1
0
        /// <summary>
        /// Create a base adaptive preprocessor with a certain underlying preprocessor (that will be adapted).
        /// </summary>
        /// <param name="underlyingPreprocessor">The underlying preprocessor.</param>
        /// <param name="adaptionRate">The adaption rate.</param>
        /// <param name="sectionNames">The section names to process in this preprocessor (all if null or empty).</param>
        protected BaseAdaptivePreprocessor(TPreprocessor underlyingPreprocessor, AdaptionRate adaptionRate, params string[] sectionNames) : base(sectionNames)
        {
            if (underlyingPreprocessor == null)
            {
                throw new ArgumentNullException(nameof(underlyingPreprocessor));
            }
            if (!Enum.IsDefined(typeof(AdaptionRate), adaptionRate))
            {
                throw new InvalidEnumArgumentException(nameof(adaptionRate), (int)adaptionRate, typeof(AdaptionRate));
            }


            _underlyingPreprocessor = underlyingPreprocessor;
            AdaptionRate            = adaptionRate;
        }
 /// <summary>
 /// Create an adaptive normalising preprocessor with a certain output range.
 /// </summary>
 /// <param name="minOutputValue">The min output value.</param>
 /// <param name="maxOutputValue">The max output value.</param>
 /// <param name="adaptionRate">The optional adaption rate.</param>
 public AdaptiveNormalisingPreprocessor(double minOutputValue, double maxOutputValue, AdaptionRate adaptionRate = AdaptionRate.Every) : this(new NormalisingPreprocessor(Double.NegativeInfinity, Double.PositiveInfinity, minOutputValue, maxOutputValue), adaptionRate)
 {
 }
 /// <summary>
 /// Create an adaptive normalising preprocessor with a certain underlying preprocessor.
 /// </summary>
 /// <param name="underlyingPreprocessor">The underlying preprocessor.</param>
 /// <param name="adaptionRate">The adaption rate.</param>
 public AdaptiveNormalisingPreprocessor(NormalisingPreprocessor underlyingPreprocessor, AdaptionRate adaptionRate = AdaptionRate.Every) : base(underlyingPreprocessor, adaptionRate)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Get an adaptive version of this normalising preprocessor.
 /// </summary>
 /// <param name="adaptionRate">The optional adaption rate.</param>
 /// <returns>An adaptive version of this normalising preprocessor.</returns>
 public IRecordPreprocessor Adaptive(AdaptionRate adaptionRate = AdaptionRate.Every)
 {
     return(Preprocess(new AdaptiveNormalisingPreprocessor(this, adaptionRate)));
 }