-
Notifications
You must be signed in to change notification settings - Fork 0
/
movie.h
47 lines (34 loc) · 896 Bytes
/
movie.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
37
38
39
40
41
42
43
44
45
46
47
//
// movie.h
// MovieGross
//
//
// Copyright © 2016 ArsenKevinMD. All rights reserved.
//
#ifndef movie_h
#define movie_h
#include <vector>
#include "csv.h"
//Global constants
const int GROSS = 7;
const int YEAR = 19;
//namespace for movie object
namespace MovieData {
//data structure to process movie data
class Movie{
//members
std::vector<float>attr;
public:
//constructor
Movie(std::vector<float>data);
//method to normalize the data
void normalize(CsvProc::Csv& csv);
//Operator to return attribute value
float operator[](int index);
//Operator to return eucledian distance
float operator-(Movie& aMovie);
//Operator to return whether two Movies are the same
bool operator==(Movie& aMovie);
};
}
#endif /* movie_h */