4#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
5 #if defined(COMPILEDLL)
6 #define LINEARALGEBRALIB_EXPORT __declspec(dllexport)
7 #elif defined(COMPILELIB)
8 #define LINEARALGEBRALIB_EXPORT
10 #define LINEARALGEBRALIB_EXPORT __declspec(dllimport)
13 #define LINEARALGEBRALIB_EXPORT
28namespace linearAlgebraLib {
45 using VectorType = std::vector<double>;
51 LINEARALGEBRALIB_EXPORT
Vector(
const unsigned &size);
57 LINEARALGEBRALIB_EXPORT
unsigned size()
const;
58 LINEARALGEBRALIB_EXPORT
Vector transpose();
59 LINEARALGEBRALIB_EXPORT
double getL2Norm()
const;
70 LINEARALGEBRALIB_EXPORT
const double &operator[](
unsigned index)
const;
71 LINEARALGEBRALIB_EXPORT
double &operator[](
unsigned index);
73 LINEARALGEBRALIB_EXPORT
Vector operator+(
const Vector &other);
74 LINEARALGEBRALIB_EXPORT
Vector operator-(
const Vector &other);
76 LINEARALGEBRALIB_EXPORT
Vector &operator*(
const double &scaleFactor);
77 LINEARALGEBRALIB_EXPORT
friend Vector operator*(
const double &scaleFactor,
Vector vector);
78 LINEARALGEBRALIB_EXPORT
double operator*(
const Vector &other);
80 LINEARALGEBRALIB_EXPORT
friend std::ostream &operator<<(std::ostream &out,
const Vector &vector);
92 bool _isRowVector =
false;
A vector class with overloaded operators to facilitate arithmetic vector operations.
Definition vector.hpp:41