#include <vector.h>
Inheritance diagram for PLib::Vector:
Public Methods | |
int | rows () const |
Vector () | |
Vector (const int r) | |
Vector (const Vector< T > &v) | |
Vector (const BasicArray< T > &v) | |
Vector (T *ap, const int size) | |
Vector (BasicList< T > &list) | |
virtual | ~Vector () |
Vector< T > & | operator= (const Vector< T > &v) |
Vector< T > & | operator= (const BasicArray< T > &b) |
Vector< T > & | operator+= (const Vector< T > &a) |
Vector< T > & | operator-= (const Vector< T > &a) |
T | operator= (const T d) |
void | as (int i, const Vector< T > &b) |
Vector< T > | get (int i, int l) |
int | minIndex () const |
T | minimum () const |
void | qSortStd () |
void | qSort (int M=7) |
void | sortIndex (Vector< int > &index, int M=7) const |
Friends | |
Vector< T > | operator+ (const Vector< T > &a, const Vector< T > &b) |
Vector< T > | operator- (const Vector< T > &a, const Vector< T > &b) |
T | operator * (const Vector< T > &a, const Vector< T > &b) |
Vector< T > | operator * (const Vector< T > &v, const double d) |
Vector< T > | operator * (const Vector< T > &v, const Complex d) |
Vector< T > | operator * (const double d, const Vector< T > &v) |
Vector< T > | operator * (const Complex d, const Vector< T > &v) |
int | operator== (const Vector< T > &a, const Vector< T > &b) |
int | operator!= (const Vector< T > &a, const Vector< T > &b) |
A simple vector class with basic linear algebraic vector operators defined.
Definition at line 68 of file vector.h.
|
copies the values of b to the vector starting from the index i.
The values of the vector b replace the values of the vector starting at the index i.
Definition at line 380 of file vector.cpp. References rows, and PLib::BasicArray::x. |
|
extract a vector of size l starting at index i.
This extracts a vector of size l by copying the values from the vector starting at index i.
Definition at line 417 of file vector.cpp. References rows, and PLib::BasicArray::x. |
|
finds the index of its minimal entry.
Scans the vector to find its minimal value and returns the index of that value.
Definition at line 451 of file vector.cpp. References PLib::BasicArray::n, and PLib::BasicArray::x. |
|
the += operator.
Each component of the vector is increased by the components of vector a.
Definition at line 131 of file vector.cpp. References PLib::BasicArray::size, and PLib::BasicArray::x. |
|
the -= operator.
Each component of the vector is decreased by the components of vector a.
Definition at line 166 of file vector.cpp. References PLib::BasicArray::size, and PLib::BasicArray::x. |
|
assigns all the components of the vector to a value.
All the components of the vector are assigned to the value d
Reimplemented from PLib::BasicArray. Definition at line 106 of file vector.cpp. References PLib::BasicArray::size, and PLib::BasicArray::x. |
|
the assignment operator with a BasicArray.
Reimplemented from PLib::BasicArray. Definition at line 80 of file vector.cpp. References PLib::BasicArray::resize, PLib::BasicArray::size, and PLib::BasicArray::x. |
|
the assignment operator.
The values of a vector are copied to this one
Definition at line 49 of file vector.cpp. References PLib::BasicArray::n, PLib::BasicArray::resize, PLib::BasicArray::sze, and PLib::BasicArray::x. |
|
do a quick sort using an optimized algorithm.
Do a quick sort of the vector using an algorithm based on the one described in "Numerical Recipes in C". You should use this method over using qSortStd since it is usually faster.
Definition at line 518 of file vector.cpp. References PLib::BasicArray::sze, and PLib::BasicArray::x. |
|
do a quick sort using the standard C library sort algorithm.
Performs a quick sort of the vector. The quick sort algorithm used is the one from the standard C library.
Definition at line 480 of file vector.cpp. |
|
generates sorted index vector.
A sorted index vector is generated by this routine. It is based on a routine described in "Numercial Recipes in C".
Definition at line 614 of file vector.cpp. References PLib::BasicArray::sze, and PLib::BasicArray::x. |
|
multiplies the vector with a complex number.
Definition at line 315 of file vector.cpp. |
|
multiplies a vector with a double.
Multiplies all the elements of the vector v with a double d.
Definition at line 284 of file vector.cpp. |
|
the multiplicative operator.
Definition at line 245 of file vector.cpp. |
|
Adds two vectors.
Definition at line 202 of file vector.cpp. |
|
Substracts two vectors.
Definition at line 224 of file vector.cpp. |
|
the equality operator.
Definition at line 344 of file vector.cpp. |