Finishing up and starting lu decomp

This commit is contained in:
2025-09-13 21:44:20 +02:00
parent 320436ce98
commit 88087ea6a6
24 changed files with 1502 additions and 699 deletions
-11
View File
@@ -1,11 +0,0 @@
#ifndef _numerics_n_
#define _numerics_n_
namespace utils{
double random(const double& min, const double& max);
}
#endif // _numerics_n_
+14
View File
@@ -66,6 +66,20 @@ public:
bool operator!=(const Vector<T>& a) const { return !(*this == a); }
//##################################################
//# VECTOR: nearly_equal_vec #
//##################################################
bool nearly_equal_vec(const Vector<T>& a, double tol=1e-12) const {
if (a.size() != v.size()) return false;
for (uint64_t i=0;i<a.size();++i) {
if (std::fabs(a[i]-v[i])>tol) {
return false;
}
}
return true;
}
//##################################################
//# VECTOR: Scalar Addition #
//##################################################