Robot
Embed:
(wiki syntax)
Show/hide line numbers
Vector.h
00001 // 00002 // Created by m007 on 26/06/2020. 00003 // 00004 00005 #ifndef UNTITLED_VECTOR_H 00006 #define UNTITLED_VECTOR_H 00007 #include <iostream> 00008 #include <cstdio> 00009 using namespace std; 00010 00011 template<class T> 00012 class Vector { 00013 private: 00014 int dimension; 00015 static int objectCount; 00016 T *n; 00017 public: 00018 Vector(); 00019 Vector(int dimension); 00020 ~Vector(); 00021 int getDimension(); 00022 void PrintResult(); 00023 Vector<T> crossProduct(Vector<T> const& VectorB); 00024 00025 00026 Vector& operator=(const Vector &other ); 00027 00028 Vector& operator=(T param[]); 00029 00030 Vector operator+(Vector<T> other); 00031 Vector operator-(Vector<T>& other); 00032 T operator*(Vector<T>& other); 00033 Vector operator*(T factor); 00034 T& operator()(int dim); 00035 }; 00036 00037 Vector<float> zeros(int num); 00038 00039 00040 Vector<float> crossProduct(Vector<float> VectorA,Vector<float> VectorB); 00041 #endif //UNTITLED_VECTOR_H
Generated on Thu Jul 14 2022 08:46:33 by
1.7.2