.. _program_listing_file_src_LouLib_Math_Vector.hpp: Program Listing for File Vector.hpp =================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/LouLib/Math/Vector.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef LOULIB_VECTOR_HPP #define LOULIB_VECTOR_HPP #include #include #include namespace LouLib { namespace Math { class Vector { private: std::vector data; public: explicit Vector(int n); Vector(std::initializer_list vectorData); explicit Vector(std::vector vectorData); Vector(const Vector& other); double& operator[](int i); const double& operator[](int i) const; int size() const; double norm(); Vector normalize(); std::string toString(); }; Vector operator+(const Vector& a, const Vector& b); Vector operator-(const Vector& a, const Vector& b); double operator*(const Vector& a, const Vector& b); Vector operator*(const double& a, const Vector& b); Vector operator*(const Vector& a, const double& b); } // Math } // LouLib #endif //LOULIB_VECTOR_HPP