コード例 #1
0
        /// <inheritdoc/>
        public double Compute(BasicStat continuousActivationStat,
                              BasicStat continuousActivationDiffStat,
                              MovingDataWindow activationMDW,
                              SimpleQueue <byte> firingMDW,
                              double activation,
                              double normalizedActivation,
                              bool spike
                              )
        {
            PredictorActivationStatFigureSettings cfg = (PredictorActivationStatFigureSettings)Cfg;

            if (cfg.Window == PredictorActivationStatFigureSettings.NAWindowNum)
            {
                return(continuousActivationStat.Get(cfg.Figure));
            }
            else
            {
                if (activationMDW.UsedCapacity >= cfg.Window)
                {
                    return(activationMDW.GetDataStat(cfg.Window).Get(cfg.Figure));
                }
                else
                {
                    return(0d);
                }
            }
        }
コード例 #2
0
 //Constructor
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="cfg">The configuration of the predictor.</param>
 public PredictorActivationStatFigure(PredictorActivationStatFigureSettings cfg)
 {
     Cfg = cfg;
     return;
 }
コード例 #3
0
 /// <summary>
 /// The copy constructor.
 /// </summary>
 /// <param name="source">The source instance.</param>
 public PredictorActivationStatFigureSettings(PredictorActivationStatFigureSettings source)
     : this(source.Figure, source.Window)
 {
     return;
 }