Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 08 / Nvector / Nvector.h
diff options
context:
space:
mode:
Commit8cf1283a4ffb9fe1901c29c087fa376de82726af (patch)
Author
 angeld55 <angel_dimitriev@abv.bg>
2022-02-19 23:30:52 +0200
Committer
 angeld55 <angel_dimitriev@abv.bg>
2022-02-19 23:30:52 +0200
Filesabdfe6bf526100dcce87a88563100e02adf7605e /Sem. 08/Nvector/Nvector.h
Object-oriented_programming_FMI-8cf1283a4ffb9fe1901c29c087fa376de82726af.tar
Object-oriented_programming_FMI-8cf1283a4ffb9fe1901c29c087fa376de82726af.tar.gz
Object-oriented_programming_FMI-8cf1283a4ffb9fe1901c29c087fa376de82726af.zip
Parentd73a7ec225516657dec74472a0491330e9999217 (diff)
clean up
1 files changed, 0 insertions, 52 deletions
-rw-r--r--Sem. 08/Nvector/Nvector.h52
diff --git a/Sem. 08/Nvector/Nvector.h b/Sem. 08/Nvector/Nvector.h
deleted file mode 100644
index 745a844..0000000
--- a/Sem. 08/Nvector/Nvector.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#pragma once
-#include <iostream>
-
-class Nvector
-{
-private:
- int* data;
- size_t size;
-
- void copyFrom(const Nvector& other);
- void free();
-
-public:
- Nvector(size_t size);
-
- Nvector(const Nvector& other);
- Nvector& operator=(const Nvector& other);
- ~Nvector();
-
- Nvector& operator+=(const Nvector& other);
- Nvector& operator-=(const Nvector& other);
-
- Nvector& operator*=(size_t scalar);
-
- int& operator[](size_t); //get set
-
- int operator[](size_t) const; // get
-
- void print();
-
- size_t operator~() const;//ize;
-
- friend std::ostream& operator<<(std::ostream& os, const Nvector& v);
- friend std::istream& operator>>(std::istream&, Nvector& v);
-};
-
-const Nvector operator+(const Nvector& lhs, const Nvector& rhs);
-const Nvector operator-(const Nvector& lhs, const Nvector& rhs);
-
-const Nvector operator*(const Nvector& lhs, size_t scalar);
-//So it could be commutative. Is there a better way?
-const Nvector operator*(size_t scalar, const Nvector& lhs);
-
-//are parallel
-bool operator||(const Nvector& lhs, const Nvector& rhs);
-
-
-//scalar product
-size_t operator%(const Nvector& lhs, const Nvector& rhs);
-
-//are perpendicular
-bool operator||(const Nvector& lhs, const Nvector& rhs); \ No newline at end of file