#include <linalg.h>
Public Member Functions | |
ComplexVector (int e) | |
Default constructor sets e as dimension of vector. | |
ComplexVector (int s, int e) | |
Dimension starts at s and ends at e. | |
ComplexVector (const ComplexVector &v) | |
Sets contents = v. | |
~ComplexVector () | |
Destructor. | |
void | setEnd (int e) |
ComplexVector | operator * (const ComplexVector &v) |
NOT Complex dot product, but product of elements. | |
Complex & | operator() (int i) |
reference one element | |
Complex | dot (const ComplexVector &v) const |
standard dot product | |
ComplexVector | apply (Complex(*fn)(Complex)) |
Apply fn to every element. | |
void | set (int i, Complex f) |
set ith element to f | |
Complex | max () const |
maximum absolute value | |
Complex | min (int &p) const |
smallest absolute element | |
void | swap (int i, int j) |
swap ith and jth elements |
|
Changes the length of a vector - copies as many elements of old one as possible, and fills any extra up with zeroes |