Skip to content

vector.h

Bhamidipati Venkatakrishnasameer edited this page Jun 11, 2024 · 1 revision

vector.h

Add this to your file #include "vector.h"

float vector_magnitude(vector<float> V) : Calculates the magnitude of a given vector

vector<float> vector_add(vector<vector<float>> V_inp) : Adds the given number of vectors

float dot_product(vector<vector<float>> V_inp) : Returns the dot product of vectors given to it

vector<float> vector_constant_multiplier(vector<float> V, float k) : Multiplies every element of this vector with a constant k