-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVektor.h
More file actions
32 lines (29 loc) · 962 Bytes
/
Vektor.h
File metadata and controls
32 lines (29 loc) · 962 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
#include <iostream>
#ifndef VEKTOR_H
#define VEKTOR_H
using namespace std;
class Vektor{
friend ostream& operator << (ostream& out, const Vektor& v);
friend istream& operator >> (istream& in, Vektor& v);
friend bool operator == (const double d[], const Vektor& c);
public:
Vektor(int a);
Vektor(const double values[]);
Vektor(const Vektor& v);
double size(void);
double Summennorm(void)const;
double Euklidnorm(void)const;
double Maximumnorm(void)const;
Vektor& operator = (const Vektor& v);
Vektor& operator += (const Vektor& v);
Vektor& operator += (const double d[]);
bool operator == (const Vektor& v) const;
bool operator == (const double d[]) const;
Vektor operator + (const Vektor& v) const;
double& operator [] (int index) const;
~Vektor();
private:
double* elems;
int sz;
};
#endif // VEKTOR_H