-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvect.h
52 lines (41 loc) · 1.03 KB
/
vect.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
48
49
50
51
52
//
// Created by danai on 06/04/2018.
//
#ifndef LAB02_PROG_VECT_H
#define LAB02_PROG_VECT_H
#include <ostream>
static int vectcount;
class vect{
public:
vect(int d, double *x);
explicit vect(int d);
vect(vect& a);
vect();
~vect();
vect& operator=(vect a);
vect operator+(const vect &a);
vect operator-(const vect &a);
vect operator*(const vect &a);
vect operator*(double a);
friend vect operator*(double a, vect b);
/*vect operator/(const vect &a);
vect operator/(double &a);
friend vect operator/(double a, vect b);*/
int getNum() const;
void setNum(int num);
int getDim() const;
void setDim(int dim);
double *getV() const;
void setV(double *v);
double getVi(int i) const;
void setVi(int i, double x);
const bool operator==(const vect &a);
vect operator-();
double operator[](int i);
friend std::ostream &operator<<(std::ostream &os, const vect &vect1);
private:
int num;
int dim;
double *v;
};
#endif //LAB02_PROG_VECT_H