class Vector


Public Methods

Vector()
Vector(int)
Vector(const Vector &)
Vector(double *data, int size)
~Vector()
int setData(double *newData, int size)
int Assemble(const Vector &V, const ID &l, double fact = 1.0)
double Norm(void) const
inline int Size(void) const
inline void Zero(void)
int addVector(double factThis, const Vector &other, double factOther)
int addMatrixVector(double factThis, const Matrix &m, const Vector &v, double factOther)
int addMatrixTransposeVector(double factThis, const Matrix &m, const Vector &v, double factOther)
inline double operator)(int x) const
inline double& operator)(int x)
double operator[](int x) const
double& operator[](int x)
Vector operator)(const ID &rows) const
Vector& operator=(const Vector &V)
Vector& operator=(const Tensor &T)
Vector& operator+=(double fact)
Vector& operator-=(double fact)
Vector& operator*=(double fact)
Vector& operator/=(double fact)
Vector operator+(double fact) const
Vector operator-(double fact) const
Vector operator*(double fact) const
Vector operator/(double fact) const
Vector& operator+=(const Vector &V)
Vector& operator-=(const Vector &V)
Vector operator+(const Vector &V) const
Vector operator-(const Vector &V) const
double operator^(const Vector &V) const
Vector operator/(const Matrix &M) const
int Assemble(const Vector &V, int init_row, double fact = 1.0)
int Extract(const Vector &V, int init_row, double fact = 1.0)
friend ostream& operator<<(ostream &s, const Vector &V)
friend istream& operator>>(istream &s, Vector &V)
inline int Vector::Size(void) const
inline void Vector::Zero(void)

Documentation

The Vector class provides the vector abstraction. A vector of order size is an ordered 1d array of size numbers. For example a vector of order 5:

Vector()

To construct a Vector of order 0

Vector(int)

To construct a Vector of order size. The constructor creates an array to store the data and zeroes this array. If not enough memory is available a warning message is printed and a Vector of order 0 is returned. The Zero() method is invoked on the new Vector before it is returned.

Vector(const Vector &)

To construct a Vector of order size whose data will be stored in the array pointed to by data. The array pointed to by data is not set to zero by the constructor. Note that delete will not be called on this array in the destructor. It is up to the user to ensure that the array pointed to by data is at least as large as size, if this is not the case erroneous results or a segmentation fault may occur.

Vector(double *data, int size)

To construct a Vector using another Vector. The new Vector will be identical to the Vector other. The constructor creates an array to store the data and zeroes this array. If not enough memory is available a warning message is printed and a Vector of order 0 is returned. The contents of the array are then set equal to the contents of other.

~Vector()

Will delete any space allocated in the constructors. If the array is passed in the constructor, the space is not deallocated.

int setData(double *newData, int size)

int Assemble(const Vector &V, const ID &l, double fact = 1.0)

double Norm(void) const

inline int Size(void) const

inline void Zero(void)

int addVector(double factThis, const Vector &other, double factOther)

int addMatrixVector(double factThis, const Matrix &m, const Vector &v, double factOther)

int addMatrixTransposeVector(double factThis, const Matrix &m, const Vector &v, double factOther)

inline double operator)(int x) const

inline double& operator)(int x)

double operator[](int x) const

double& operator[](int x)

Vector operator)(const ID &rows) const

Vector& operator=(const Vector &V)

Vector& operator=(const Tensor &T)

Vector& operator+=(double fact)

Vector& operator-=(double fact)

Vector& operator*=(double fact)

Vector& operator/=(double fact)

Vector operator+(double fact) const

Vector operator-(double fact) const

Vector operator*(double fact) const

Vector operator/(double fact) const

Vector& operator+=(const Vector &V)

Vector& operator-=(const Vector &V)

Vector operator+(const Vector &V) const

Vector operator-(const Vector &V) const

double operator^(const Vector &V) const

Vector operator/(const Matrix &M) const

int Assemble(const Vector &V, int init_row, double fact = 1.0)

int Extract(const Vector &V, int init_row, double fact = 1.0)

friend ostream& operator<<(ostream &s, const Vector &V)

friend istream& operator>>(istream &s, Vector &V)

inline int Vector::Size(void) const

inline void Vector::Zero(void)


This class has no child classes.

alphabetic index Contents

this page has been generated automatically by a slightly modified version of doc++ for OpenSees

Copyright Contact Us