From 41f612789f652654b5f2fa8c3fee4e348e2081b1 Mon Sep 17 00:00:00 2001 From: Siddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com> Date: Sat, 26 Apr 2025 20:21:02 -0400 Subject: Initial vector extension changes --- inc/vec.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 inc/vec.h (limited to 'inc/vec.h') diff --git a/inc/vec.h b/inc/vec.h deleted file mode 100644 index 68482d5..0000000 --- a/inc/vec.h +++ /dev/null @@ -1,44 +0,0 @@ -// vec.h -#ifndef VEC_H -#define VEC_H - -#include -#include -#include - -template -class Vec { -private: - std::vector data; - -public: - Vec() = default; - Vec(const std::vector& values) : data(values) {} - - // Vector-Vector Operations - Vec operator+(const Vec& other) const; - Vec operator-(const Vec& other) const; - Vec operator*(const Vec& other) const; - Vec operator/(const Vec& other) const; - Vec operator%(const Vec& other) const; - - // Vector-Scalar Operations - Vec operator+(T scalar) const; - Vec operator-(T scalar) const; - Vec operator*(T scalar) const; - Vec operator/(T scalar) const; - Vec operator%(T scalar) const; - - // Utility - void print() const; - size_t size() const { return data.size(); } - - // Friend scalar-vector operations - friend Vec operator+(T scalar, const Vec& vec) { return vec + scalar; } - friend Vec operator-(T scalar, const Vec& vec); - friend Vec operator*(T scalar, const Vec& vec) { return vec * scalar; } - friend Vec operator/(T scalar, const Vec& vec); - friend Vec operator%(T scalar, const Vec& vec); -}; - -#endif -- cgit v1.2.3