-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMedian.h
More file actions
27 lines (23 loc) · 785 Bytes
/
Median.h
File metadata and controls
27 lines (23 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//---------------------------------------------------------------------------
#ifndef MedianH
#define MedianH
//---------------------------------------------------------------------------
class Median
{
public:
__fastcall Median();
__fastcall ~Median();
double __fastcall GetMedian(double * arr, int n);
__property bool Average = { read=GetAverage, write=SetAverage };
__property double AverageFactor = { read=GetAverageFactor, write=SetAverageFactor };
protected:
void __fastcall Sort(double * arr, int n);
private:
bool m_bAverage;
double m_dAverageFactor;
void __fastcall SetAverage(bool value);
bool __fastcall GetAverage();
void __fastcall SetAverageFactor(double value);
double __fastcall GetAverageFactor();
};
#endif