public ExtremaSearchConfig(int sensitivity, ExtremaDataModel dataModel, int?searchIndexLimit = null, GeometricRecoveryConfig geometricRecoveryConfig = null, double?startAmplitude = null) { this.Sensitivity = sensitivity; this.DataModel = dataModel; this.GeometricRecoveryConfig = geometricRecoveryConfig; this.SearchIndexLimit = searchIndexLimit; this.StartAmplitude = startAmplitude; }
protected double[] GetFeatures(PointIndexPair extremaPoint, double[] intervals, ExtremaDataModel model) { double extremaTime = intervals[extremaPoint.PointIndex] - intervals[0]; // add the time / amplitude of the extrema point double[] extremaFeatures; switch (model) { case ExtremaDataModel.AMPLITUDE: extremaFeatures = new double[] { extremaPoint.PointAmplitude }; break; case ExtremaDataModel.TIME: extremaFeatures = new double[] { extremaTime }; break; default: extremaFeatures = new double[] { extremaPoint.PointAmplitude, extremaTime }; break; } return(extremaFeatures); }
public GeometricExtractorBuilder FindExtremaPoint(int sensitivity, ExtremaDataModel dataModel = ExtremaDataModel.TIME_AMPLITUDE, int?searchIndexLimit = null, GeometricRecoveryConfig geometricRecoveryConfig = null, double?startAmplitude = null) { searchConfig.Add(new ExtremaSearchConfig(sensitivity, dataModel, searchIndexLimit, geometricRecoveryConfig, startAmplitude)); return(this); }