DataPeak.h
1 /**************************************************************************************
2 Copyright 2015 Applied Research Associates, Inc.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the License
5 at:
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software distributed under
8 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9 CONDITIONS OF ANY KIND, either express or implied. See the License for the
10 specific language governing permissions and limitations under the License.
11 **************************************************************************************/
12 
13 #pragma once
14 #include <biogears/exports.h>
15 
16 namespace biogears {
25 class BIOGEARS_API DataPeak {
26 public:
42  DataPeak(unsigned int samples, double epsilon);
43 
45  void Reset();
46 
50  double LastTopPeak();
51 
55  double LastBottomPeak();
56 
60  bool Peaked(double value);
61 
62 protected:
64  bool m_FindMax;
65  bool m_FindMin;
66  unsigned int m_Samples;
67  unsigned int m_PeakCount;
68  double m_Epsilon;
69  double m_SamplePeak;
70  double m_LastTopPeak;
72 };
73 }
bool m_FindMin
Definition: DataPeak.h:65
unsigned int m_PeakCount
Definition: DataPeak.h:67
double m_SamplePeak
Definition: DataPeak.h:69
unsigned int m_Samples
Definition: DataPeak.h:66
Definition: DataPeak.h:25
double m_LastBottomPeak
Definition: DataPeak.h:71
double m_LastTopPeak
Definition: DataPeak.h:70
Definition: SEElectricalCircuit.h:18
double m_Epsilon
Definition: DataPeak.h:68
bool m_FindMax
Definition: DataPeak.h:64
bool m_PositiveTrend
Definition: DataPeak.h:63