-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKendallsVector.h
More file actions
66 lines (49 loc) · 1.68 KB
/
KendallsVector.h
File metadata and controls
66 lines (49 loc) · 1.68 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#pragma once
#ifdef KENDALLSVECTOR_EXPORTS
#define KENDALLSVECTOR_API __declspec(dllexport)
#else
#define KENDALLSVECTOR_API __declspec(dllimport)
#endif
#include <vector>
namespace Kendall {
struct Coordinate {
int x;
int y;
} ;
class __declspec(dllexport) KendallsVector
{
public:
KendallsVector(); // initial constructor
KendallsVector(Coordinate initial ,Coordinate terminal); // constructor that takes the points
KendallsVector(std::vector<int> component); // constructor that takes the component
~KendallsVector();
void print(); // prints the components of the vecor
std::vector<int> addVector(KendallsVector vector);
std::vector<int> subractVector(KendallsVector vector);
// mutators:
void setVectorCoordinates(Coordinate initial, Coordinate terminal);
// accessors:
std::vector<Coordinate> getVectorCoordinates();
std::vector<int> getVectorComponent();
// public methods:
int dotProduct(KendallsVector vector);
int getMagnitude();
/*
float getAngleBetweenVectors(KendallsVector vector);
float getAngleBetweenVectors(std::vector<int>);
float isOrthogonal(std::vector<int> vector);
float isParallel(std::vector<int> vector);
float scalar(int number);*/
private:
/*std::vector<T> getComponent();
bool validateVectorSize(Coordinate<T> initial, Coordinate<T> terminal);
std::vector<T> EgetComponent(Coordinate<T> initial, Coordinate<T> terminal);*/
std::vector<int> EgetComponent(Coordinate initial, Coordinate terminal);
//bool validateVectorSize(Coordinate<T> initial, Coordinate<T> terminal);
Coordinate initialPoint = {};
Coordinate terminalPoint = {};
std::vector<int> kendallComponent = {};
int size;
protected:
};
}