aboutsummaryrefslogtreecommitdiff
path: root/include/linalg_error.hpp
diff options
context:
space:
mode:
authory-jan137 <yousefjan24000@gmail.com>2026-03-12 15:01:35 +0300
committery-jan137 <yousefjan24000@gmail.com>2026-03-12 15:01:35 +0300
commit8ac4d298a209a2b381f203c2b63e59ace9736846 (patch)
treefb1fbda3739afb60f76dd4bb48241957a5a3baa0 /include/linalg_error.hpp
parentbfd7f0d6a9f81e093a390be968058732cc7562c6 (diff)
Add matrix, vector classes and tests
Diffstat (limited to 'include/linalg_error.hpp')
-rw-r--r--include/linalg_error.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linalg_error.hpp b/include/linalg_error.hpp
new file mode 100644
index 0000000..8258899
--- /dev/null
+++ b/include/linalg_error.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <stdexcept>
+#include <string>
+
+namespace linalg {
+
+class LinAlgError : public std::runtime_error {
+public:
+ using std::runtime_error::runtime_error;
+};
+
+class DimensionMismatchError : public LinAlgError {
+public:
+ explicit DimensionMismatchError(const std::string& message)
+ : LinAlgError(message) {}
+};
+
+} // namespace linalg