-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvector.h
More file actions
40 lines (29 loc) · 840 Bytes
/
Copy pathvector.h
File metadata and controls
40 lines (29 loc) · 840 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef VECTOR_H_
#define VECTOR_H_
#include <vector>
#include "header.h"
#include "data/vector3.h"
class Vector
{
private:
std::vector<double> data;
public:
Vector();
Vector(int i);
Vector(const Vector& src); // copy
Vector(Vector&& src); // move
Vector& operator*=(double h);
Vector& operator+=(const Vector& other);
double& operator[](unsigned int i);
const double& operator[](unsigned int i) const;
vector3 getPos(unsigned int i) const;
vector3 getVel(unsigned int i) const;
Vector& operator=(const Vector& other);
Vector operator/(double h) const;
void addBody(double x, double y, double z, double vx, double vy, double vz);
unsigned int size() const;
void resize(int n, double d);
void printOut(unsigned int i) const;
void printOut() const;
};
#endif