Finishing up and starting lu decomp
This commit is contained in:
@@ -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 #
|
||||
//##################################################
|
||||
|
||||
Reference in New Issue
Block a user