1
- // ConvexHull : Definition
2
- #ifndef CONVEXHULLEXTRAS
3
- #define CONVEXHULLEXTRAS
1
+ // UpperHull : Definition
2
+ #ifndef UPPERHULLEXTRAS
3
+ #define UPPERHULLEXTRAS
4
4
5
5
/* ==============================================================================
6
6
Includes
@@ -18,9 +18,9 @@ class emptyContext {};
18
18
==============================================================================*/
19
19
20
20
template <class I >
21
- class ConvexHullExtras : public StackAlgoExtras <emptyContext, Point2D, I> {
21
+ class UpperHullExtras : public StackAlgoExtras <emptyContext, Point2D, I> {
22
22
public:
23
- ConvexHullExtras (std::string filePath, bool usecompressed, bool useclassic)
23
+ UpperHullExtras (std::string filePath, bool usecompressed, bool useclassic)
24
24
: StackAlgoExtras<emptyContext, Point2D, I>(filePath, usecompressed,
25
25
useclassic) {}
26
26
@@ -57,7 +57,7 @@ class ConvexHullExtras : public StackAlgoExtras<emptyContext, Point2D, I> {
57
57
* reportStack
58
58
==============================================================================*/
59
59
template <class I >
60
- Point2D ConvexHullExtras <I>::readInput(std::vector<std::string> line) {
60
+ Point2D UpperHullExtras <I>::readInput(std::vector<std::string> line) {
61
61
double x = std::stof (line[0 ]);
62
62
double y = std::stof (line[1 ]);
63
63
@@ -69,7 +69,7 @@ Point2D ConvexHullExtras<I>::readInput(std::vector<std::string> line) {
69
69
}
70
70
71
71
template <class I >
72
- std::shared_ptr<emptyContext> ConvexHullExtras <I>::initStack() {
72
+ std::shared_ptr<emptyContext> UpperHullExtras <I>::initStack() {
73
73
// std::cout << "going to read two values " << std::endl;
74
74
75
75
// first, read and push two values
@@ -85,7 +85,7 @@ std::shared_ptr<emptyContext> ConvexHullExtras<I>::initStack() {
85
85
return context;
86
86
}
87
87
88
- template <class I > bool ConvexHullExtras <I>::popCondition(Point2D last) {
88
+ template <class I > bool UpperHullExtras <I>::popCondition(Point2D last) {
89
89
Point2D minus1, minus2;
90
90
std::cout << std::endl << last << " <<<< pop condition enter " << std::endl;
91
91
StackAlgo<emptyContext, Point2D, I>::println ();
@@ -103,27 +103,27 @@ template <class I> bool ConvexHullExtras<I>::popCondition(Point2D last) {
103
103
104
104
return false ;
105
105
}
106
- template <class I > void ConvexHullExtras <I>::prePop(Point2D data) {}
106
+ template <class I > void UpperHullExtras <I>::prePop(Point2D data) {}
107
107
template <class I >
108
- void ConvexHullExtras <I>::postPop(Point2D data,
109
- Data<emptyContext, Point2D, I> elt) {
108
+ void UpperHullExtras <I>::postPop(Point2D data,
109
+ Data<emptyContext, Point2D, I> elt) {
110
110
// std::cout << elt.getData() << " <<<< Pop!" << std::endl;
111
111
}
112
- template <class I > void ConvexHullExtras <I>::noPop(Point2D data) {}
112
+ template <class I > void UpperHullExtras <I>::noPop(Point2D data) {}
113
113
114
- template <class I > bool ConvexHullExtras <I>::pushCondition(Point2D data) {
114
+ template <class I > bool UpperHullExtras <I>::pushCondition(Point2D data) {
115
115
// std::cout << data << " <<<< push condition returning true " << std::endl;
116
116
return true ;
117
117
}
118
118
template <class I >
119
- void ConvexHullExtras <I>::prePush(Data<emptyContext, Point2D, I> elt) {}
119
+ void UpperHullExtras <I>::prePush(Data<emptyContext, Point2D, I> elt) {}
120
120
template <class I >
121
- void ConvexHullExtras <I>::postPush(Data<emptyContext, Point2D, I> elt) {
122
- // std::cout << "ConvexHullStackAlgo ::pushAction Nothing to see here " <<
121
+ void UpperHullExtras <I>::postPush(Data<emptyContext, Point2D, I> elt) {
122
+ // std::cout << "UpperHullStackAlgo ::pushAction Nothing to see here " <<
123
123
// elt.getData() << std::endl;
124
124
}
125
- template <class I > void ConvexHullExtras <I>::noPush(Point2D data) {}
125
+ template <class I > void UpperHullExtras <I>::noPush(Point2D data) {}
126
126
127
- template <class I > void ConvexHullExtras <I>::reportStack() {}
127
+ template <class I > void UpperHullExtras <I>::reportStack() {}
128
128
129
- #endif // CONVEXHULLEXTRAS
129
+ #endif // UPPERHULLEXTRAS
0 commit comments