#include <vector.h>
Inheritance diagram for PLib::Vector< T >:
Public Member Functions | |
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) | |
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 |
template<> | |
int | minIndex () const |
template<> | |
void | qSort (int) |
template<> | |
void | sortIndex (Vector< int > &, int) const |
template<> | |
void | qSortStd () |
template<> | |
int | minIndex () 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.
|
Basic constructor.
|
|
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.
|
|
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.
|
|
finds the index of its minimal entry Scans the vector to find its minimal value and returns the index of that value.
|
|
the += operator Each component of the vector is increased by the components of vector a.
|
|
the -= operator Each component of the vector is decreased by the components of vector a.
|
|
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< T >. |
|
the assignment operator with a BasicArray
Reimplemented from PLib::BasicArray< T >. |
|
the assignment operator The values of a vector are copied to this one
|
|
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.
|
|
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.
|
|
< a reference to the size of the vector
|
|
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".
|
|
|
|
|
|
multiplies the vector with a complex number
|
|
multiplies a vector with a double Multiplies all the elements of the vector v with a double d.
|
|
the multiplicative operator
|
|
|
|
Adds two vectors.
|
|
Substracts two vectors.
|
|
the equality operator
|