/// <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); } } }
//Constructor /// <summary> /// Creates an initialized instance. /// </summary> /// <param name="cfg">The configuration of the predictor.</param> public PredictorActivationStatFigure(PredictorActivationStatFigureSettings cfg) { Cfg = cfg; return; }
/// <summary> /// The copy constructor. /// </summary> /// <param name="source">The source instance.</param> public PredictorActivationStatFigureSettings(PredictorActivationStatFigureSettings source) : this(source.Figure, source.Window) { return; }