#include <VectorNumeric.h>
Inheritance diagram for OSCAR::VectorNumeric< Type >:

Public Methods | |
| VectorNumeric (unsigned int sz, const Type *array=0) | |
| VectorNumeric (const VectorNumeric &rhs) | |
| double | GetMagnitude () const |
| double | Norm () const |
| Type | NormSqr () const |
| double | GetMagnitude (unsigned int fromIndex, unsigned int toIndex) const |
| Type | GetSum () const |
| Type | GetAbsoluteValueSum () const |
| Type | Max () const |
| unsigned int | MaxIndex () const |
| Type | Min () const |
| unsigned int | MinIndex () const |
| VectorNumeric & | Normalize () |
| VectorNumeric | Unit () const |
| void | ToString (char *cmd) |
| String | ToFlatString () const |
| VectorNumeric< Type > & | operator= (const VectorNumeric< Type > &vectorToCopy) |
| VectorNumeric< Type > & | operator= (Type rhs) |
| int | operator== (const VectorNumeric &rhs) const |
| VectorNumeric< Type > | operator+ (const VectorNumeric &rhs) const |
| VectorNumeric< Type > | operator- (const VectorNumeric &rhs) const |
| VectorNumeric< Type > | operator- () const |
| VectorNumeric< Type > | operator * (Type rhs) const |
| VectorNumeric< Type > | operator/ (Type rhs) const |
| VectorNumeric< Type > & | operator *= (const Type rhs) |
| VectorNumeric< Type > & | operator/= (const Type rhs) |
| VectorNumeric< Type > & | operator+= (const Type rhs) |
| VectorNumeric< Type > & | operator-= (const Type rhs) |
| VectorNumeric< Type > & | operator+= (const VectorNumeric &rhs) |
| VectorNumeric< Type > & | operator-= (const VectorNumeric &rhs) |
| VectorNumeric< Type > & | SortAscending () |
| VectorNumeric< Type > & | SortDescending () |
| Type | Dot (const VectorNumeric &rhs) const |
| VectorNumeric< Type > | Project (const VectorNumeric< Type > &that) const |
| void | Orthog (VectorNumeric &rhs) const |
| void | Null () |
Protected Methods | |
| VectorNumeric () | |
| bool | quickSort (Type *pArr, unsigned int iSize, bool bAscending) |
| void | quickSortRecursive (Type *pArr, int d, int h, bool bAscending) |
|
||||||||||||||||
|
Constructor. This is the constructor for an object of type VectorNumeric. Use this to construct an empty (all elements 0) vector object of size sz. Explicit keyword prevents implicit conversion from a scalar to an VectorNumeric object
|
|
||||||||||
|
Copy Constructor. This is the copy constructor for an object of type VectorNumeric. Use this to construct an VectorNumeric object from an existing VectorNumeric object.
|
|
|||||||||
|
Constructor. Constructor. This does nothing. It is only used for stack allocation purposes in derived classes |
|
||||||||||
|
Return the dot (inner) product between VectorNumeric object and the calling object. This method returns performs the dot product between vectors. Return value is sum over all i of this.at(i)*rhs.at(i)
|
|
|||||||||
|
Get the absolute value of the sum of the elements of a vector. This method is used to get the absolute value of the sum of the elements of a vector.
|
|
||||||||||||||||
|
Get the magnitude (2-norm) of a vector from start index up to ending index. This method is used to get the magnitude (2-norm) of a vector on the range [a,b). This range includes a, but not b, which allows one to call a.GetMagnitude(0,a.GetSize());
|
|
|||||||||
|
Get the the magnitude (2-norm) of a vector. This method is used to get the magnitude (2-norm) of a vector.
|
|
|||||||||
|
Get the sum of the elements of a vector. This method is used to get the sum of the elements of a vector.
|
|
|||||||||
|
Get the maximum value of the elements of a vector. This method is used to get the maximum value of the elements of a vector.
|
|
|||||||||
|
Get the the index where the max value occurs.
|
|
|||||||||
|
Get the minimum value of the elements of a vector. This method is used to get the minimum value of the elements of a vector.
|
|
|||||||||
|
Get the the index where the min value occurs.
|
|
|||||||||
|
Get the 2-norm (magnitude) of an vector. This method is another name for GetMagnitude().
|
|
|||||||||
|
Normalize an vector. This method is used to normalize an Vector to a unit vector and return a reference to itself. If the norm of the vector is 0, this method does nothing.
|
|
|||||||||
|
Get the square of the 2-norm (magnitude) of an vector. This method returns the sum(squares of elements in vector). It is faster than Norm() and GetMagnitude(), as it does not do the sqrt() operation.
|
|
|||||||||
|
Sets this vector to the null vector Sets all elements of the vector to zero.
|
|
||||||||||
|
Overloaded * operator. Overloaded * operator. This operator multiplies all elements of a VectorNumeric object by a scalar quantity.
|
|
||||||||||
|
Overloaded *= operator. Overloaded *= operator. This operator multiplies all elements of a VectorNumeric object by a scalar quantity.
|
|
||||||||||
|
Overloaded + operator. Overloaded + operator. This operator adds a VectorNumeric object to the calling object. An error occurs if both the VectorNumeric objects are of different sizes.
|
|
||||||||||
|
Overloaded += operator. Overloaded += operator. This operator adds a VectorNumeric object to the calling object.
|
|
||||||||||
|
Overloaded += operator. Overloaded += operator. This operator adds a scalar quantity to all the elements of a VectorNumeric object.
|
|
|||||||||
|
Overloaded - operator. Overloaded - operator. This operator returns another VectorNumeric, where return[i] = -1*object[i]
|
|
||||||||||
|
Overloaded - operator. Overloaded - operator. This operator subtracts a VectorNumeric object from the calling VectorNumeric object. An error occurs if both the VectorNumeric objects are of different sizes.
|
|
||||||||||
|
Overloaded -= operator. Overloaded -= operator. This operator subtracts a VectorNumeric object from the calling object.
|
|
||||||||||
|
Overloaded -= operator. Overloaded -= operator. This operator subtracts a scalar quantity from all the elements of a VectorNumeric object.
|
|
||||||||||
|
Overloaded / operator. Overloaded / operator. This operator multiplies all elements of a VectorNumeric object by a scalar quantity.
|
|
||||||||||
|
Overloaded /= operator. Overloaded /= operator. This operator divides all elements of a VectorNumeric object by a scalar quantity.
|
|
||||||||||
|
Overloaded = operator. Overloaded = operator. This assigns a value of Type to entire VectorNumeric object.
|
|
||||||||||
|
Assignment operator. This is the Assignment operator for an object of type VectorNumeric. This operator will resize the calling object if the vector being copied is not of the same size.
|
|
||||||||||
|
Overloaded == operator. Overloaded == operator. This operator checks to see if two VectorNumeric objects are equal or not.
|
|
||||||||||
|
Orthogonalizes VectorNumeric object to the calling object. This method modifies the argument to be orthogonal the calling object, i.e. this->Dot(rhs) =0.
|
|
||||||||||
|
Projection of the argument onto the calling object. This method returns the projection of the argument onto the calling object
|
|
||||||||||||||||||||
|
Sort a vector using quick sort. This method is used to sort a vector using quick sort.
|
|
||||||||||||||||||||||||
|
Sort a vector recursively using quick sort. This method is used to sort a vector recursively using quick sort.
|
|
|||||||||
|
Sort a vector in ascending order. This method is used to sort a vector in ascending order.
|
|
|||||||||
|
Sort a vector in descending order. This method is used to sort a vector in descending order.
|
|
|||||||||
|
Serializes the vector to a String Convert a vector to a string representation. All elements are placed in the return string with. No carriage or special characters are returns are placed between the elements.
|
|
||||||||||
|
Output the VectorNumeric. This method is used to output the VectorNumeric.
|
|
|||||||||
|
Return a unit vector. This method is used to return a normalized unit Vector. If the norm of the vector is 0, this method returns a copy of the calling vector.
|
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |