us_vector.h
More...
#include "us_vector.h"
us_vector.h
A collecion of vector routines for doubles.
Definition at line 9 of file us_vector.h.
US_Vector::US_Vector |
( |
int |
size, |
|
|
double |
value = 0.0 |
|
) |
| |
Create a vector of doubles.
- Parameters
-
size | The length of the vector |
value | The initial values of the vector |
Definition at line 6 of file us_vector.cpp.
void US_Vector::add |
( |
const US_Vector & |
other | ) |
|
Add two vectors.
other The vector to be added
Definition at line 12 of file us_vector.cpp.
void US_Vector::add |
( |
double |
value | ) |
|
Add a constant to every element of a vector.
value The constant to add to the vector elements
Definition at line 20 of file us_vector.cpp.
void US_Vector::assign |
( |
int |
i, |
|
|
double |
d |
|
) |
| |
|
inline |
Assign a value to a vector element.
- Parameters
-
i | The element to change |
d | The value to assign to the element |
Definition at line 54 of file us_vector.h.
double US_Vector::distance |
( |
const US_Vector & |
other | ) |
|
Calculate the Euclidean distance between two vectors.
- Parameters
-
other | The second vector of the calculation |
Definition at line 52 of file us_vector.cpp.
double US_Vector::dot |
( |
const US_Vector & |
other | ) |
|
Calculate the dot product of two vectors.
- Parameters
-
other | The second vector of the calculation |
Definition at line 26 of file us_vector.cpp.
double US_Vector::L2norm |
( |
void |
| ) |
|
Calculate the L2 norm of the vector.
Definition at line 63 of file us_vector.cpp.
void US_Vector::mult |
( |
const US_Vector & |
other | ) |
|
Multiply the elements of two vectors, element by element.
- Parameters
-
other | The second vector of the calculation |
Definition at line 38 of file us_vector.cpp.
double US_Vector::operator[] |
( |
int |
i | ) |
const |
|
inline |
Return an element using the [] operator.
- Parameters
-
Definition at line 58 of file us_vector.h.
void US_Vector::scale |
( |
double |
value | ) |
|
Scale a vector by a constant value.
- Parameters
-
value | The constant to scale each element of the vector |
Definition at line 46 of file us_vector.cpp.
int US_Vector::size |
( |
void |
| ) |
const |
|
inline |
Return the number of elements in the vector.
Definition at line 45 of file us_vector.h.
QVector< double > US_Vector::v |
|
private |
The documentation for this class was generated from the following files: