![]() |
University of Murcia, Spain ![]() |
QVVector Class ReferenceImplementation of numerical vectors.
More...
|
Public Member Functions | |
QVVector () | |
Default constructor for QVVector. | |
QVVector (const int size, const double defaultValue=0) | |
Constructor for QVVector. | |
QVVector (const QVVector &vector) | |
Copy constructor for QVVector. | |
QVVector (const QVector< double > &vector) | |
Copy constructor for QVector. | |
QVVector (const QVMatrix &matrix) | |
Convert constructor from QVMatrix. | |
QVVector (const gsl_vector *vector) | |
Copy constructor for gsl_vector. | |
QVVector (const QPoint &point) | |
Convert constructor for QPoint. | |
QVVector (const QPointF &point) | |
Convert constructor for QPointF. | |
double | operator * (const QVVector &vector) const |
Vector dot product. | |
QVVector | operator^ (const QVVector &vector) const |
Vector cross product. | |
QVVector | operator+ (const QVVector &vector) const |
Vector add. | |
QVVector | operator- (const QVVector &vector) const |
Vector substraction. | |
QVVector | operator * (const double value) const |
Scalar multiplication. | |
QVVector | operator/ (const double value) const |
Scalar division. | |
QVVector | operator * (const QVMatrix &matrix) const |
Vector-matrix product. | |
bool | operator== (const QVVector &vector) const |
Compare operator. | |
QVVector & | operator+= (const QVVector &vector) |
Add compound assignment operator. | |
operator QPointF () const | |
Convert to QPointF operator. | |
operator gsl_vector * () const | |
Convert to gsl_vector * operator. | |
void | set (const double value) |
Set vector elements to a value. | |
QVVector | subVector (const int firstIndex, const int lastIndex) |
Set vector elements to a value. | |
QVVector | scalarDivision (const double value) const |
Scalar division. | |
QVVector | scalarMultiplication (const double value) const |
Scalar multiplication. | |
double | norm2 () const |
Norm 2 of the vector. | |
QVVector | normalize () const |
Normalize vector. | |
double | dotProduct (const QVVector &vector) const |
Vector dot product. | |
QVVector | crossProduct (const QVVector &vector) const |
Vector cross product. | |
QVVector | add (const QVVector &vector) const |
Vector add. | |
QVVector | substract (const QVVector &vector) const |
Vector substraction. | |
bool | equals (const QVVector &vector) const |
Compare operator. | |
Static Public Member Functions | |
static const QVVector | gaussianDistribution (const int size, const double sigma) |
Gaussian distributed values vector. |
Definition at line 43 of file qvvector.h.
QVVector::QVVector | ( | ) | [inline] |
Default constructor for QVVector.
vector | operand for the product |
Definition at line 49 of file qvvector.h.
QVVector::QVVector | ( | const int | size, | |
const double | defaultValue = 0 | |||
) | [inline] |
Constructor for QVVector.
int | initializing size for the vector | |
defaultValue | default value to set all elements of the vector |
Definition at line 55 of file qvvector.h.
QVVector::QVVector | ( | const QVVector & | vector | ) | [inline] |
Copy constructor for QVVector.
vector | vector to be copied |
Definition at line 60 of file qvvector.h.
QVVector::QVVector | ( | const QVector< double > & | vector | ) | [inline] |
Copy constructor for QVector.
vector | vector to be copied |
Definition at line 65 of file qvvector.h.
QVVector::QVVector | ( | const QVMatrix & | matrix | ) |
Convert constructor from QVMatrix.
This function converts a QVMatrix object into a QVVector object. Given a matrix $ A_{m,n} $, this function generates a row vector of size mxn, containing each one of the rows of the original matrix.
matrix | matrix to be converted. |
Definition at line 29 of file qvvector.cpp.
QVVector::QVVector | ( | const gsl_vector * | vector | ) | [inline] |
Copy constructor for gsl_vector.
vector | vector to be copied |
Definition at line 79 of file qvvector.h.
QVVector::QVVector | ( | const QPoint & | point | ) | [inline] |
Convert constructor for QPoint.
vector | vector to be copied |
Definition at line 88 of file qvvector.h.
QVVector::QVVector | ( | const QPointF & | point | ) | [inline] |
Convert constructor for QPointF.
vector | vector to be copied |
Definition at line 93 of file qvvector.h.
double QVVector::operator * | ( | const QVVector & | vector | ) | const [inline] |
Vector dot product.
vector | operand for the product |
Definition at line 101 of file qvvector.h.
Vector cross product.
vector | operand for the product |
Definition at line 107 of file qvvector.h.
Vector add.
vector | term for the operation |
Definition at line 113 of file qvvector.h.
Vector substraction.
vector | subtrahend for the operation |
Definition at line 119 of file qvvector.h.
QVVector QVVector::operator * | ( | const double | value | ) | const [inline] |
Scalar multiplication.
value | value to multiply each component of the vector |
Definition at line 125 of file qvvector.h.
QVVector QVVector::operator/ | ( | const double | value | ) | const [inline] |
Scalar division.
value | value to divide each component of the vector |
Definition at line 131 of file qvvector.h.
Referenced by normalize().
Vector-matrix product.
matrix | operand for the product |
Definition at line 66 of file qvvector.cpp.
bool QVVector::operator== | ( | const QVVector & | vector | ) | const [inline] |
Compare operator.
vector | vector to compare |
Definition at line 142 of file qvvector.h.
Add compound assignment operator.
vector | vector to add |
Definition at line 147 of file qvvector.h.
QVVector::operator QPointF | ( | ) | const [inline] |
Convert to QPointF operator.
Cast from homogeneous coordinates.
Definition at line 154 of file qvvector.h.
QVVector::operator gsl_vector * | ( | ) | const [inline] |
Convert to gsl_vector * operator.
value | gsl_vector |
Definition at line 167 of file qvvector.h.
void QVVector::set | ( | const double | value | ) | [inline] |
Set vector elements to a value.
value | value to set all the elements of the vector |
Definition at line 181 of file qvvector.h.
QVVector QVVector::subVector | ( | const int | firstIndex, | |
const int | lastIndex | |||
) | [inline] |
Set vector elements to a value.
value | value to set all the elements of the vector |
Definition at line 190 of file qvvector.h.
Referenced by QVQuaternion::quaternionProduct().
QVVector QVVector::scalarDivision | ( | const double | value | ) | const [inline] |
Scalar division.
value | value to divide each component of the vector |
Definition at line 207 of file qvvector.h.
Referenced by operator/().
QVVector QVVector::scalarMultiplication | ( | const double | value | ) | const [inline] |
Scalar multiplication.
value | value to multiply each component of the vector |
Definition at line 219 of file qvvector.h.
Referenced by operator *().
double QVVector::norm2 | ( | ) | const [inline] |
Norm 2 of the vector.
Definition at line 230 of file qvvector.h.
Referenced by GetExtrinsicCameraMatrixFromHomography(), HomographyTestError(), normalize(), QVQuaternion::QVQuaternion(), and QVQuaternion::trackball().
QVVector QVVector::normalize | ( | ) | const [inline] |
Normalize vector.
Divides each element of the vector by its second norm.
Definition at line 237 of file qvvector.h.
double QVVector::dotProduct | ( | const QVVector & | vector | ) | const |
Vector dot product.
vector | operand for the product |
Definition at line 38 of file qvvector.cpp.
Referenced by operator *().
Vector cross product.
Computes the cross product for two vectors of size 3
vector | operand for the product |
Definition at line 49 of file qvvector.cpp.
Referenced by operator^().
Vector add.
vector | term for the operation |
Definition at line 72 of file qvvector.cpp.
Vector substraction.
vector | subtrahend for the operation |
Definition at line 83 of file qvvector.cpp.
Referenced by operator-().
bool QVVector::equals | ( | const QVVector & | vector | ) | const |
Compare operator.
vector | vector to compare |
Definition at line 94 of file qvvector.cpp.
Referenced by operator==().
static const QVVector QVVector::gaussianDistribution | ( | const int | size, | |
const double | sigma | |||
) | [inline, static] |
Gaussian distributed values vector.
This function generates a vector containing values for a gaussian distribution, with median in the middle value of the vector, and deviation indicated.
vector | vector to compare |
Definition at line 280 of file qvvector.h.