-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSwiftSample.H
37 lines (33 loc) · 1016 Bytes
/
SwiftSample.H
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
27
28
29
30
31
32
33
34
35
36
/****************************************************************
SwiftSample.H
Copyright (C)2017 William H. Majoros ([email protected]).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
****************************************************************/
#ifndef INCL_SwiftSample_H
#define INCL_SwiftSample_H
#include <iostream>
#include "BOOM/Comparator.H"
using namespace std;
using namespace BOOM;
class SwiftSample {
float p, q, theta;
void computeTheta();
public:
SwiftSample();
SwiftSample(float p,float q);
float getP() const;
float getQ() const;
float getTheta() const;
};
class SwiftSampleComparator : public Comparator<SwiftSample>
{
public:
bool equal(SwiftSample &a,SwiftSample &b)
{ return a.getTheta()==b.getTheta(); }
bool greater(SwiftSample &a,SwiftSample &b)
{ return a.getTheta()>b.getTheta(); }
bool less(SwiftSample &a,SwiftSample &b)
{ return a.getTheta()<b.getTheta(); }
};
#endif