diff --git a/matrix_8hpp.html b/matrix_8hpp.html index f06b881..2e75eca 100644 --- a/matrix_8hpp.html +++ b/matrix_8hpp.html @@ -72,11 +72,11 @@
matrix.hpp File Reference
-
#include <vector>
-#include <complex>
-#include <utility>
-#include <tuple>
+
#include <complex>
#include <initializer_list>
+#include <tuple>
+#include <utility>
+#include <vector>

Go to the source code of this file.

diff --git a/matrix_8hpp_source.html b/matrix_8hpp_source.html index 782c2da..bb3f7b6 100644 --- a/matrix_8hpp_source.html +++ b/matrix_8hpp_source.html @@ -73,11 +73,11 @@
2 
3 #pragma once
4 
-
5 #include <vector>
-
6 #include <complex>
-
7 #include <utility>
-
8 #include <tuple>
-
9 #include <initializer_list>
+
5 #include <complex>
+
6 #include <initializer_list>
+
7 #include <tuple>
+
8 #include <utility>
+
9 #include <vector>
10 
11 namespace cramer {
12 
@@ -86,153 +86,153 @@
15 
16 template <typename T>
17 class Matrix {
-
18 private:
+
18  private:
19  size_t rows;
20  size_t cols;
21  std::vector<std::vector<T>> data;
22 
27  T max_norm() const;
28 
-
29 public:
+
29  public:
33  Matrix();
34 
40  Matrix(size_t rows, size_t cols);
41 
-
48  Matrix(size_t rows, size_t cols, const T& value);
-
49 
-
54  Matrix(const std::vector<std::vector<T>>& values);
-
55 
-
63  Matrix(size_t rows, size_t cols, std::initializer_list<T> values);
-
64 
-
69  size_t get_rows() const;
-
70 
-
75  size_t get_cols() const;
-
76 
-
82  static Matrix identity(size_t size);
-
83 
-
90  static Matrix zeros(size_t rows, size_t cols);
-
91 
-
98  static Matrix ones(size_t rows, size_t cols);
-
99 
-
106  static Matrix random(size_t rows, size_t cols);
-
107 
-
114  T& operator()(size_t row, size_t col);
-
115 
-
122  const T& operator()(size_t row, size_t col) const;
-
123 
-
129  bool operator==(const Matrix<T>& other) const;
-
130 
-
136  Matrix<T> operator+(const Matrix<T>& other) const;
-
137 
-
143  Matrix<T>& operator+=(const Matrix<T>& other);
-
144 
-
150  Matrix<T> operator-(const Matrix<T>& other) const;
-
151 
-
157  Matrix<T>& operator-=(const Matrix<T>& other);
-
158 
-
164  Matrix<T> operator*(const T& scalar) const;
-
165 
-
171  Matrix<T>& operator*=(const T& scalar);
-
172 
-
178  Matrix<T> operator*(const Matrix<T>& other) const;
-
179 
-
185  Vector<T> multiply_vector(const Vector<T>& vec) const;
-
186 
-
191  bool is_square() const;
-
192 
-
197  bool is_diagonal() const;
-
198 
-
203  bool is_symmetric() const;
-
204 
-
209  bool is_invertible() const;
-
210 
-
215  bool is_hermitian() const;
-
216 
-
221  bool is_orthogonal() const;
-
222 
-
227  T trace() const;
-
228 
-
233  T det() const;
-
234 
-
239  T det_via_lu() const;
-
240 
-
245  Matrix<T> transpose() const;
-
246 
-
251  Matrix<T> inverse() const;
-
252 
-
257  Matrix<T> adjoint() const;
-
258 
-
263  Matrix<T> conjugate() const;
-
264 
-
269  Matrix<T> exp() const;
-
270 
-
276  Matrix<T> pow(int n) const;
-
277 
-
282  Matrix<T> sqrt() const;
-
283 
-
288  Matrix<T> log() const;
-
289 
-
294  std::pair<Matrix<T>, Matrix<T>> lu() const;
-
295 
-
300  std::pair<Matrix<T>, Matrix<T>> qr() const;
-
301 
-
306  std::tuple<Matrix<T>, Matrix<T>, Matrix<T>> svd() const;
-
307 
-
312  std::vector<std::complex<T>> eigenvalues() const;
-
313 
-
318  Matrix<T> eigenvectors() const;
-
319 
-
324  size_t rank() const;
-
325 
-
331  Vector<T> solve(const Vector<T>& b) const;
-
332 };
-
333 
-
334 } // namespace cramer
+
49  Matrix(size_t rows, size_t cols, const T& value);
+
50 
+
55  Matrix(const std::vector<std::vector<T>>& values);
+
56 
+
65  Matrix(size_t rows, size_t cols, std::initializer_list<T> values);
+
66 
+
71  size_t get_rows() const;
+
72 
+
77  size_t get_cols() const;
+
78 
+
84  static Matrix identity(size_t size);
+
85 
+
92  static Matrix zeros(size_t rows, size_t cols);
+
93 
+
100  static Matrix ones(size_t rows, size_t cols);
+
101 
+
108  static Matrix random(size_t rows, size_t cols);
+
109 
+
116  T& operator()(size_t row, size_t col);
+
117 
+
124  const T& operator()(size_t row, size_t col) const;
+
125 
+
131  bool operator==(const Matrix<T>& other) const;
+
132 
+
138  Matrix<T> operator+(const Matrix<T>& other) const;
+
139 
+
145  Matrix<T>& operator+=(const Matrix<T>& other);
+
146 
+
152  Matrix<T> operator-(const Matrix<T>& other) const;
+
153 
+
159  Matrix<T>& operator-=(const Matrix<T>& other);
+
160 
+
166  Matrix<T> operator*(const T& scalar) const;
+
167 
+
173  Matrix<T>& operator*=(const T& scalar);
+
174 
+
180  Matrix<T> operator*(const Matrix<T>& other) const;
+
181 
+
187  Vector<T> multiply_vector(const Vector<T>& vec) const;
+
188 
+
193  bool is_square() const;
+
194 
+
199  bool is_diagonal() const;
+
200 
+
205  bool is_symmetric() const;
+
206 
+
211  bool is_invertible() const;
+
212 
+
217  bool is_hermitian() const;
+
218 
+
223  bool is_orthogonal() const;
+
224 
+
229  T trace() const;
+
230 
+
235  T det() const;
+
236 
+
241  T det_via_lu() const;
+
242 
+
247  Matrix<T> transpose() const;
+
248 
+
253  Matrix<T> inverse() const;
+
254 
+
259  Matrix<T> adjoint() const;
+
260 
+
265  Matrix<T> conjugate() const;
+
266 
+
271  Matrix<T> exp() const;
+
272 
+
278  Matrix<T> pow(int n) const;
+
279 
+
284  Matrix<T> sqrt() const;
+
285 
+
290  Matrix<T> log() const;
+
291 
+
297  std::pair<Matrix<T>, Matrix<T>> lu() const;
+
298 
+
304  std::pair<Matrix<T>, Matrix<T>> qr() const;
+
305 
+
311  std::tuple<Matrix<T>, Matrix<T>, Matrix<T>> svd() const;
+
312 
+
317  std::vector<std::complex<T>> eigenvalues() const;
+
318 
+
323  Matrix<T> eigenvectors() const;
+
324 
+
329  size_t rank() const;
+
330 
+
336  Vector<T> solve(const Vector<T>& b) const;
+
337 };
+
338 
+
339 } // namespace cramer
Definition: matrix.hpp:17
-
Matrix< T > exp() const
Calculates the matrix exponential.
Definition: matrix.cpp:578
-
static Matrix ones(size_t rows, size_t cols)
Creates a matrix of ones with specified dimensions.
Definition: matrix.cpp:100
-
size_t rank() const
Calculates the rank of the matrix.
Definition: matrix.cpp:895
-
T det() const
Calculates the determinant of the matrix.
Definition: matrix.cpp:421
-
Matrix< T > & operator+=(const Matrix< T > &other)
Addition assignment operator.
Definition: matrix.cpp:185
-
Matrix< T > eigenvectors() const
Calculates the eigenvectors of the matrix.
Definition: matrix.cpp:859
-
bool is_symmetric() const
Checks if the matrix is symmetric.
Definition: matrix.cpp:348
-
std::vector< std::complex< T > > eigenvalues() const
Calculates the eigenvalues of the matrix.
Definition: matrix.cpp:816
-
bool is_hermitian() const
Checks if the matrix is Hermitian.
Definition: matrix.cpp:378
-
Matrix< T > pow(int n) const
Calculates the matrix power.
Definition: matrix.cpp:621
-
Matrix< T > operator-(const Matrix< T > &other) const
Subtraction operator.
Definition: matrix.cpp:201
-
size_t get_cols() const
Gets the number of columns in the matrix.
Definition: matrix.cpp:77
-
Matrix< T > sqrt() const
Calculates the square root of the matrix.
Definition: matrix.cpp:648
-
Matrix< T > adjoint() const
Calculates the adjoint of the matrix.
Definition: matrix.cpp:520
-
Matrix< T > & operator-=(const Matrix< T > &other)
Subtraction assignment operator.
Definition: matrix.cpp:219
-
Matrix< T > log() const
Calculates the matrix logarithm.
Definition: matrix.cpp:678
-
Vector< T > solve(const Vector< T > &b) const
Solves the linear system Ax = b.
Definition: matrix.cpp:912
-
bool is_square() const
Checks if the matrix is square.
Definition: matrix.cpp:326
-
Matrix< T > inverse() const
Calculates the inverse of the matrix.
Definition: matrix.cpp:494
-
std::tuple< Matrix< T >, Matrix< T >, Matrix< T > > svd() const
Performs Singular Value Decomposition (SVD) of the matrix.
Definition: matrix.cpp:791
-
Matrix()
Default constructor. Creates an empty matrix.
Definition: matrix.cpp:40
-
T trace() const
Calculates the trace of the matrix.
Definition: matrix.cpp:410
-
std::pair< Matrix< T >, Matrix< T > > qr() const
Performs QR decomposition of the matrix.
Definition: matrix.cpp:755
-
bool is_invertible() const
Checks if the matrix is invertible.
Definition: matrix.cpp:365
+
Matrix< T > exp() const
Calculates the matrix exponential.
Definition: matrix.cpp:579
+
static Matrix ones(size_t rows, size_t cols)
Creates a matrix of ones with specified dimensions.
Definition: matrix.cpp:101
+
size_t rank() const
Calculates the rank of the matrix.
Definition: matrix.cpp:893
+
T det() const
Calculates the determinant of the matrix.
Definition: matrix.cpp:422
+
Matrix< T > & operator+=(const Matrix< T > &other)
Addition assignment operator.
Definition: matrix.cpp:186
+
Matrix< T > eigenvectors() const
Calculates the eigenvectors of the matrix.
Definition: matrix.cpp:857
+
bool is_symmetric() const
Checks if the matrix is symmetric.
Definition: matrix.cpp:349
+
std::vector< std::complex< T > > eigenvalues() const
Calculates the eigenvalues of the matrix.
Definition: matrix.cpp:814
+
bool is_hermitian() const
Checks if the matrix is Hermitian.
Definition: matrix.cpp:379
+
Matrix< T > pow(int n) const
Calculates the matrix power.
Definition: matrix.cpp:625
+
Matrix< T > operator-(const Matrix< T > &other) const
Subtraction operator.
Definition: matrix.cpp:202
+
size_t get_cols() const
Gets the number of columns in the matrix.
Definition: matrix.cpp:78
+
Matrix< T > sqrt() const
Calculates the square root of the matrix.
Definition: matrix.cpp:652
+
Matrix< T > adjoint() const
Calculates the adjoint of the matrix.
Definition: matrix.cpp:521
+
Matrix< T > & operator-=(const Matrix< T > &other)
Subtraction assignment operator.
Definition: matrix.cpp:220
+
Matrix< T > log() const
Calculates the matrix logarithm.
Definition: matrix.cpp:682
+
Vector< T > solve(const Vector< T > &b) const
Solves the linear system Ax = b.
Definition: matrix.cpp:910
+
bool is_square() const
Checks if the matrix is square.
Definition: matrix.cpp:327
+
Matrix< T > inverse() const
Calculates the inverse of the matrix.
Definition: matrix.cpp:495
+
std::tuple< Matrix< T >, Matrix< T >, Matrix< T > > svd() const
Performs Singular Value Decomposition (SVD) of the matrix.
Definition: matrix.cpp:789
+
Matrix()
Default constructor. Creates an empty matrix.
Definition: matrix.cpp:41
+
T trace() const
Calculates the trace of the matrix.
Definition: matrix.cpp:411
+
std::pair< Matrix< T >, Matrix< T > > qr() const
Performs QR decomposition of the matrix.
Definition: matrix.cpp:753
+
bool is_invertible() const
Checks if the matrix is invertible.
Definition: matrix.cpp:366
T max_norm() const
Calculates the maximum norm of the matrix.
Definition: matrix.cpp:19
-
Matrix< T > & operator*=(const T &scalar)
Scalar multiplication assignment operator.
Definition: matrix.cpp:248
+
Matrix< T > & operator*=(const T &scalar)
Scalar multiplication assignment operator.
Definition: matrix.cpp:249
size_t cols
Definition: matrix.hpp:20
-
Matrix< T > operator+(const Matrix< T > &other) const
Addition operator.
Definition: matrix.cpp:167
-
static Matrix identity(size_t size)
Creates an identity matrix of specified size.
Definition: matrix.cpp:84
-
static Matrix zeros(size_t rows, size_t cols)
Creates a zero matrix of specified dimensions.
Definition: matrix.cpp:95
-
bool is_orthogonal() const
Checks if the matrix is orthogonal.
Definition: matrix.cpp:399
-
Vector< T > multiply_vector(const Vector< T > &vec) const
Multiplies the matrix with a vector.
Definition: matrix.cpp:307
-
Matrix< T > transpose() const
Calculates the transpose of the matrix.
Definition: matrix.cpp:481
-
Matrix< T > operator*(const T &scalar) const
Scalar multiplication operator.
Definition: matrix.cpp:235
-
bool operator==(const Matrix< T > &other) const
Equality comparison operator.
Definition: matrix.cpp:151
+
Matrix< T > operator+(const Matrix< T > &other) const
Addition operator.
Definition: matrix.cpp:168
+
static Matrix identity(size_t size)
Creates an identity matrix of specified size.
Definition: matrix.cpp:85
+
static Matrix zeros(size_t rows, size_t cols)
Creates a zero matrix of specified dimensions.
Definition: matrix.cpp:96
+
bool is_orthogonal() const
Checks if the matrix is orthogonal.
Definition: matrix.cpp:400
+
Vector< T > multiply_vector(const Vector< T > &vec) const
Multiplies the matrix with a vector.
Definition: matrix.cpp:308
+
Matrix< T > transpose() const
Calculates the transpose of the matrix.
Definition: matrix.cpp:482
+
Matrix< T > operator*(const T &scalar) const
Scalar multiplication operator.
Definition: matrix.cpp:236
+
bool operator==(const Matrix< T > &other) const
Equality comparison operator.
Definition: matrix.cpp:152
std::vector< std::vector< T > > data
Definition: matrix.hpp:21
-
bool is_diagonal() const
Checks if the matrix is diagonal.
Definition: matrix.cpp:331
-
size_t get_rows() const
Gets the number of rows in the matrix.
Definition: matrix.cpp:72
-
Matrix< T > conjugate() const
Calculates the conjugate of the matrix.
Definition: matrix.cpp:557
-
static Matrix random(size_t rows, size_t cols)
Creates a matrix with random values between 0 and 1.
Definition: matrix.cpp:105
-
T det_via_lu() const
Calculates the determinant of the matrix using LU decomposition.
Definition: matrix.cpp:462
+
bool is_diagonal() const
Checks if the matrix is diagonal.
Definition: matrix.cpp:332
+
size_t get_rows() const
Gets the number of rows in the matrix.
Definition: matrix.cpp:73
+
Matrix< T > conjugate() const
Calculates the conjugate of the matrix.
Definition: matrix.cpp:558
+
static Matrix random(size_t rows, size_t cols)
Creates a matrix with random values between 0 and 1.
Definition: matrix.cpp:106
+
T det_via_lu() const
Calculates the determinant of the matrix using LU decomposition.
Definition: matrix.cpp:463
size_t rows
Definition: matrix.hpp:19
-
T & operator()(size_t row, size_t col)
Access operator for matrix elements.
Definition: matrix.cpp:141
-
std::pair< Matrix< T >, Matrix< T > > lu() const
Performs LU decomposition of the matrix.
Definition: matrix.cpp:718
+
T & operator()(size_t row, size_t col)
Access operator for matrix elements.
Definition: matrix.cpp:142
+
std::pair< Matrix< T >, Matrix< T > > lu() const
Performs LU decomposition of the matrix.
Definition: matrix.cpp:716
Represents a vector of elements of type T.
Definition: vector.hpp:17
Definition: matrix.hpp:11
diff --git a/vector_8hpp.html b/vector_8hpp.html index e46c6b1..fe5c23f 100644 --- a/vector_8hpp.html +++ b/vector_8hpp.html @@ -72,9 +72,9 @@
vector.hpp File Reference
-
#include <vector>
-#include <complex>
+
#include <complex>
#include <cstddef>
+#include <vector>

Go to the source code of this file.

diff --git a/vector_8hpp_source.html b/vector_8hpp_source.html index f26e616..f4ed26f 100644 --- a/vector_8hpp_source.html +++ b/vector_8hpp_source.html @@ -73,118 +73,119 @@
2 
3 #pragma once
4 
-
5 #include <vector>
-
6 #include <complex>
-
7 #include <cstddef>
+
5 #include <complex>
+
6 #include <cstddef>
+
7 #include <vector>
8 
9 namespace cramer {
10 
16 template <typename T>
17 class Vector {
18  private:
-
19  std::vector<T> data;
-
21  public:
-
25  Vector();
-
26 
-
32  Vector(size_t size);
-
33 
-
41  Vector(size_t size, const T& value);
-
42 
-
49  Vector(const std::vector<T>& values);
-
50 
-
56  size_t size() const;
-
57 
-
64  T& operator[](size_t index);
-
65 
-
73  const T& operator[](size_t index) const;
-
74 
-
82  Vector<T> operator+(const Vector<T>& other) const;
-
83 
-
91  Vector<T>& operator+=(const Vector<T>& other);
-
92 
-
100  Vector<T> operator-(const Vector<T>& other) const;
-
101 
-
109  Vector<T>& operator-=(const Vector<T>& other);
-
110 
-
117  Vector<T> operator*(const T& scalar) const;
-
118 
-
125  Vector<T>& operator*=(const T& scalar);
-
126 
-
133  T dot(const Vector<T>& other) const;
-
134 
-
140  T norm() const;
-
141 
-
148  Vector<T> normalize() const;
-
149 
-
157  Vector<T> cross(const Vector<T>& other) const;
-
158 
-
166  T angle(const Vector<T>& other) const;
-
167 
-
174  Vector<T> project(const Vector<T>& onto) const;
+
19  std::vector<T>
+
20  data;
+
22  public:
+
26  Vector();
+
27 
+
33  Vector(size_t size);
+
34 
+
42  Vector(size_t size, const T& value);
+
43 
+
50  Vector(const std::vector<T>& values);
+
51 
+
57  size_t size() const;
+
58 
+
65  T& operator[](size_t index);
+
66 
+
74  const T& operator[](size_t index) const;
+
75 
+
83  Vector<T> operator+(const Vector<T>& other) const;
+
84 
+
92  Vector<T>& operator+=(const Vector<T>& other);
+
93 
+
101  Vector<T> operator-(const Vector<T>& other) const;
+
102 
+
110  Vector<T>& operator-=(const Vector<T>& other);
+
111 
+
119  Vector<T> operator*(const T& scalar) const;
+
120 
+
128  Vector<T>& operator*=(const T& scalar);
+
129 
+
137  T dot(const Vector<T>& other) const;
+
138 
+
144  T norm() const;
+
145 
+
153  Vector<T> normalize() const;
+
154 
+
164  Vector<T> cross(const Vector<T>& other) const;
+
165 
+
174  T angle(const Vector<T>& other) const;
175 
-
182  Vector<T> reject(const Vector<T>& from) const;
-
183 
-
190  Vector<T> reflect(const Vector<T>& normal) const;
-
191 
-
198  bool operator==(const Vector<T>& other) const;
-
199 
-
206  bool operator!=(const Vector<T>& other) const;
-
207 
-
215  Vector<T> elementwise_multiply(const Vector<T>& other) const;
-
216 
-
225  Vector<T> elementwise_divide(const Vector<T>& other) const;
-
226 
-
232  T sum() const;
-
233 
-
239  T product() const;
-
240 
-
247  T min() const;
-
248 
-
255  T max() const;
-
256 
-
262  Vector<T> abs() const;
-
263 
-
270  Vector<T> pow(T exponent) const;
-
271 
-
278  Vector<T> sqrt() const;
-
279 
-
285  Vector<T> exp() const;
-
286 
-
293  Vector<T> log() const;
-
294 };
-
295 
-
296 } // namespace cramer
+
183  Vector<T> project(const Vector<T>& onto) const;
+
184 
+
193  Vector<T> reject(const Vector<T>& from) const;
+
194 
+
201  Vector<T> reflect(const Vector<T>& normal) const;
+
202 
+
209  bool operator==(const Vector<T>& other) const;
+
210 
+
217  bool operator!=(const Vector<T>& other) const;
+
218 
+
226  Vector<T> elementwise_multiply(const Vector<T>& other) const;
+
227 
+
236  Vector<T> elementwise_divide(const Vector<T>& other) const;
+
237 
+
243  T sum() const;
+
244 
+
250  T product() const;
+
251 
+
258  T min() const;
+
259 
+
266  T max() const;
+
267 
+
274  Vector<T> abs() const;
+
275 
+
282  Vector<T> pow(T exponent) const;
+
283 
+
292  Vector<T> sqrt() const;
+
293 
+
300  Vector<T> exp() const;
+
301 
+
310  Vector<T> log() const;
+
311 };
+
312 
+
313 } // namespace cramer
Represents a vector of elements of type T.
Definition: vector.hpp:17
-
Vector< T > log() const
Computes the natural logarithm of each element in the vector.
Definition: vector.cpp:283
-
std::vector< T > data
Definition: vector.hpp:19
-
T norm() const
Calculates the Euclidean norm (magnitude) of the vector.
Definition: vector.cpp:111
+
Vector< T > log() const
Computes the natural logarithm of each element in the vector.
Definition: vector.cpp:298
+
std::vector< T > data
Definition: vector.hpp:20
+
T norm() const
Calculates the Euclidean norm (magnitude) of the vector.
Definition: vector.cpp:117
T & operator[](size_t index)
Overloads the [] operator to access elements of the vector.
Definition: vector.cpp:30
-
T angle(const Vector< T > &other) const
Calculates the angle between the current vector and another vector.
Definition: vector.cpp:137
+
T angle(const Vector< T > &other) const
Calculates the angle between the current vector and another vector.
Definition: vector.cpp:145
Vector()
Default constructor. Creates an empty vector.
Definition: vector.cpp:13
-
T dot(const Vector< T > &other) const
Calculates the dot product of the current vector and another vector.
Definition: vector.cpp:103
-
Vector< T > pow(T exponent) const
Raises each element of the vector to the specified power.
Definition: vector.cpp:251
-
Vector< T > reflect(const Vector< T > &normal) const
Reflects the current vector about a normal vector.
Definition: vector.cpp:158
-
T product() const
Calculates the product of all elements in the vector.
Definition: vector.cpp:205
-
Vector< T > normalize() const
Returns a normalized version of the vector.
Definition: vector.cpp:116
-
Vector< T > elementwise_multiply(const Vector< T > &other) const
Performs element-wise multiplication of two vectors.
Definition: vector.cpp:173
+
T dot(const Vector< T > &other) const
Calculates the dot product of the current vector and another vector.
Definition: vector.cpp:107
+
Vector< T > pow(T exponent) const
Raises each element of the vector to the specified power.
Definition: vector.cpp:265
+
Vector< T > reflect(const Vector< T > &normal) const
Reflects the current vector about a normal vector.
Definition: vector.cpp:166
+
T product() const
Calculates the product of all elements in the vector.
Definition: vector.cpp:216
+
Vector< T > normalize() const
Returns a normalized version of the vector.
Definition: vector.cpp:123
+
Vector< T > elementwise_multiply(const Vector< T > &other) const
Performs element-wise multiplication of two vectors.
Definition: vector.cpp:181
Vector< T > operator+(const Vector< T > &other) const
Overloads the + operator to perform vector addition.
Definition: vector.cpp:40
-
Vector< T > & operator*=(const T &scalar)
Overloads the *= operator to perform scalar multiplication and assignment.
Definition: vector.cpp:95
-
T min() const
Finds the minimum element in the vector.
Definition: vector.cpp:217
-
Vector< T > elementwise_divide(const Vector< T > &other) const
Performs element-wise division of two vectors.
Definition: vector.cpp:185
-
Vector< T > & operator+=(const Vector< T > &other)
Overloads the += operator to perform vector addition and assignment.
Definition: vector.cpp:52
-
Vector< T > operator*(const T &scalar) const
Overloads the * operator to perform scalar multiplication.
Definition: vector.cpp:86
-
bool operator!=(const Vector< T > &other) const
Overloads the != operator to check for vector inequality.
Definition: vector.cpp:168
-
T max() const
Finds the maximum element in the vector.
Definition: vector.cpp:230
-
Vector< T > project(const Vector< T > &onto) const
Projects the current vector onto another vector.
Definition: vector.cpp:147
-
Vector< T > exp() const
Computes the exponential of each element in the vector.
Definition: vector.cpp:275
-
Vector< T > cross(const Vector< T > &other) const
Calculates the cross product of the current vector and another vector.
Definition: vector.cpp:125
-
bool operator==(const Vector< T > &other) const
Overloads the == operator to check for vector equality.
Definition: vector.cpp:163
-
T sum() const
Calculates the sum of all elements in the vector.
Definition: vector.cpp:200
-
Vector< T > & operator-=(const Vector< T > &other)
Overloads the -= operator to perform vector subtraction and assignment.
Definition: vector.cpp:75
-
Vector< T > reject(const Vector< T > &from) const
Calculates the rejection of the current vector from another vector.
Definition: vector.cpp:153
-
Vector< T > abs() const
Computes the absolute value of each element in the vector.
Definition: vector.cpp:243
-
Vector< T > operator-(const Vector< T > &other) const
Overloads the - operator to perform vector subtraction.
Definition: vector.cpp:63
-
Vector< T > sqrt() const
Computes the square root of each element in the vector.
Definition: vector.cpp:259
+
Vector< T > & operator*=(const T &scalar)
Overloads the *= operator to perform scalar multiplication and assignment.
Definition: vector.cpp:99
+
T min() const
Finds the minimum element in the vector.
Definition: vector.cpp:229
+
Vector< T > elementwise_divide(const Vector< T > &other) const
Performs element-wise division of two vectors.
Definition: vector.cpp:194
+
Vector< T > & operator+=(const Vector< T > &other)
Overloads the += operator to perform vector addition and assignment.
Definition: vector.cpp:53
+
Vector< T > operator*(const T &scalar) const
Overloads the * operator to perform scalar multiplication.
Definition: vector.cpp:90
+
bool operator!=(const Vector< T > &other) const
Overloads the != operator to check for vector inequality.
Definition: vector.cpp:176
+
T max() const
Finds the maximum element in the vector.
Definition: vector.cpp:243
+
Vector< T > project(const Vector< T > &onto) const
Projects the current vector onto another vector.
Definition: vector.cpp:155
+
Vector< T > exp() const
Computes the exponential of each element in the vector.
Definition: vector.cpp:290
+
Vector< T > cross(const Vector< T > &other) const
Calculates the cross product of the current vector and another vector.
Definition: vector.cpp:132
+
bool operator==(const Vector< T > &other) const
Overloads the == operator to check for vector equality.
Definition: vector.cpp:171
+
T sum() const
Calculates the sum of all elements in the vector.
Definition: vector.cpp:211
+
Vector< T > & operator-=(const Vector< T > &other)
Overloads the -= operator to perform vector subtraction and assignment.
Definition: vector.cpp:78
+
Vector< T > reject(const Vector< T > &from) const
Calculates the rejection of the current vector from another vector.
Definition: vector.cpp:161
+
Vector< T > abs() const
Computes the absolute value of each element in the vector.
Definition: vector.cpp:257
+
Vector< T > operator-(const Vector< T > &other) const
Overloads the - operator to perform vector subtraction.
Definition: vector.cpp:65
+
Vector< T > sqrt() const
Computes the square root of each element in the vector.
Definition: vector.cpp:273
size_t size() const
Returns the size of the vector.
Definition: vector.cpp:25
Definition: matrix.hpp:11