Public Member Functions | Friends
fVec Class Reference

Vector of generic size. More...

#include <fMatrix.h>

Inheritance diagram for fVec:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void abs ()
 Converts all elements to their absolute values.
 fVec ()
 fVec (int m, double *ini=0)
 fVec (int m, double ini)
 fVec (const fVec &ini)
void get_subvec (int start, const fVec &allV)
 Copy a sub-vector of a larger vector.
double length () const
 Length of the vector.
int lineq (const fMat &A, const fVec &b)
 Solves linear equation Ax = b.
int lineq_porfs (const fMat &A, const fVec &b)
int lineq_posv (const fMat &A, const fVec &b)
int lineq_sr (const fMat &A, fVec &w_err, fVec &w_norm, double k, const fVec &b)
int lineq_svd (const fMat &A, const fVec &b, int lwork=-1)
int max_index ()
 Returns the index of the largest element.
double max_value ()
 Returns the maximum value.
int min_index ()
 Returns the index of the smallest element.
double min_value ()
 Returns the minimum value.
double & operator() (int i)
 Returns the reference to the i-th element.
double operator() (int i) const
 Returns the value of the i-th element.
void operator= (double d)
 Assignment operations.
fVec operator= (const fVec &vec)
void resize (int i)
 Change the size.
void set (double *_d)
 Sets all elements.
void set_subvec (int start, const fVec &subV)
 Copy a smaller vector as a sub-vector.
int size () const
 Size of the vector (same as row()).
double sum ()
 Returns the sum of the elements.
void unit ()
 Converts to a unit vector (no length check!).
void zero ()
 Creates a zero vector.
 ~fVec ()
Functions

Operators in function forms (faster).

void set (const fVec &vec)
void neg (const fVec &vec)
void add (const fVec &vec1, const fVec &vec2)
void add (const fVec &vec)
void sub (const fVec &vec1, const fVec &vec2)
void div (const fVec &vec, double d)
void mul (const fVec &vec, double d)
void mul (double d, const fVec &vec)
void mul (const fMat &mat, const fVec &vec)
 M * v.
void mul (const fVec &vec, const fMat &mat)
 v^T * M

Friends

double length (const fVec &v)
 Length of the vector.
fVec unit (const fVec &v)
 Returns a unit vector with the same direction (no length check!).

Operators

Operators

void operator+= (const fVec &vec)
void operator-= (const fVec &vec)
void operator*= (double d)
void operator/= (double d)
fVec operator- (const fVec &vec)
fVec operator+ (const fVec &vec1, const fVec &vec2)
fVec operator- (const fVec &vec1, const fVec &vec2)
fVec operator/ (const fVec &vec, double d)
fVec operator* (double d, const fVec &vec)
fVec operator* (const fVec &vec, double d)
double operator* (const fVec &vec1, const fVec &vec2)

Detailed Description

Vector of generic size.

Definition at line 491 of file fMatrix.h.


Constructor & Destructor Documentation

fVec::fVec ( ) [inline]

Definition at line 495 of file fMatrix.h.

fVec::fVec ( int  m,
double *  ini = 0 
) [inline]

Definition at line 497 of file fMatrix.h.

fVec::fVec ( int  m,
double  ini 
) [inline]

Definition at line 499 of file fMatrix.h.

fVec::fVec ( const fVec ini) [inline]

Definition at line 501 of file fMatrix.h.

fVec::~fVec ( ) [inline]

Definition at line 503 of file fMatrix.h.


Member Function Documentation

Converts all elements to their absolute values.

Definition at line 1510 of file fMatrix.cpp.

void fVec::add ( const fVec vec1,
const fVec vec2 
)

Definition at line 1562 of file fMatrix.cpp.

void fVec::add ( const fVec vec)

Definition at line 1568 of file fMatrix.cpp.

void fVec::div ( const fVec vec,
double  d 
)

Definition at line 1599 of file fMatrix.cpp.

void fVec::get_subvec ( int  start,
const fVec allV 
)

Copy a sub-vector of a larger vector.

Definition at line 65 of file fMatrix.cpp.

double fVec::length ( void  ) const [inline]

Length of the vector.

Definition at line 553 of file fMatrix.h.

int fVec::lineq ( const fMat A,
const fVec b 
)

Solves linear equation Ax = b.

Definition at line 163 of file fMatrix.cpp.

int fVec::lineq_porfs ( const fMat A,
const fVec b 
)

Definition at line 788 of file fMatrix.cpp.

int fVec::lineq_posv ( const fMat A,
const fVec b 
)

Definition at line 765 of file fMatrix.cpp.

int fVec::lineq_sr ( const fMat A,
fVec w_err,
fVec w_norm,
double  k,
const fVec b 
)

Definition at line 869 of file fMatrix.cpp.

int fVec::lineq_svd ( const fMat A,
const fVec b,
int  lwork = -1 
)

Definition at line 468 of file fMatrix.cpp.

Returns the index of the largest element.

fVec

Definition at line 1446 of file fMatrix.cpp.

double fVec::max_value ( )

Returns the maximum value.

Definition at line 1478 of file fMatrix.cpp.

Returns the index of the smallest element.

Definition at line 1462 of file fMatrix.cpp.

double fVec::min_value ( )

Returns the minimum value.

Definition at line 1494 of file fMatrix.cpp.

void fVec::mul ( const fVec vec,
double  d 
)

Definition at line 1620 of file fMatrix.cpp.

void fVec::mul ( double  d,
const fVec vec 
)

Definition at line 1626 of file fMatrix.cpp.

void fVec::mul ( const fMat mat,
const fVec vec 
)

M * v.

Definition at line 1380 of file fMatrix.cpp.

void fVec::mul ( const fVec vec,
const fMat mat 
)

v^T * M

Definition at line 1401 of file fMatrix.cpp.

void fVec::neg ( const fVec vec)

Definition at line 1524 of file fMatrix.cpp.

double& fVec::operator() ( int  i) [inline]

Returns the reference to the i-th element.

Definition at line 538 of file fMatrix.h.

double fVec::operator() ( int  i) const [inline]

Returns the value of the i-th element.

Definition at line 543 of file fMatrix.h.

void fVec::operator*= ( double  d)

Reimplemented from fMat.

Definition at line 1552 of file fMatrix.cpp.

void fVec::operator+= ( const fVec vec)

Definition at line 1539 of file fMatrix.cpp.

void fVec::operator-= ( const fVec vec)

Definition at line 1546 of file fMatrix.cpp.

void fVec::operator/= ( double  d)

Reimplemented from fMat.

Definition at line 1557 of file fMatrix.cpp.

void fVec::operator= ( double  d)

Assignment operations.

Reimplemented from fMat.

Definition at line 1646 of file fMatrix.cpp.

fVec fVec::operator= ( const fVec vec)

Definition at line 1651 of file fMatrix.cpp.

void fVec::resize ( int  i) [inline]

Change the size.

Definition at line 511 of file fMatrix.h.

void fVec::set ( double *  _d) [inline]

Sets all elements.

Reimplemented from fMat.

Definition at line 533 of file fMatrix.h.

void fVec::set ( const fVec vec)

Definition at line 1518 of file fMatrix.cpp.

void fVec::set_subvec ( int  start,
const fVec subV 
)

Copy a smaller vector as a sub-vector.

Definition at line 76 of file fMatrix.cpp.

int fVec::size ( void  ) const [inline]

Size of the vector (same as row()).

Definition at line 507 of file fMatrix.h.

void fVec::sub ( const fVec vec1,
const fVec vec2 
)

Definition at line 1583 of file fMatrix.cpp.

double fVec::sum ( ) [inline]

Returns the sum of the elements.

Definition at line 569 of file fMatrix.h.

void fVec::unit ( ) [inline]

Converts to a unit vector (no length check!).

Definition at line 564 of file fMatrix.h.

void fVec::zero ( ) [inline]

Creates a zero vector.

Reimplemented from fMat.

Definition at line 575 of file fMatrix.h.


Friends And Related Function Documentation

double length ( const fVec v) [friend]

Length of the vector.

Definition at line 549 of file fMatrix.h.

fVec operator* ( double  d,
const fVec vec 
) [friend]

Definition at line 1632 of file fMatrix.cpp.

fVec operator* ( const fVec vec,
double  d 
) [friend]

Definition at line 1639 of file fMatrix.cpp.

double operator* ( const fVec vec1,
const fVec vec2 
) [friend]

Definition at line 1612 of file fMatrix.cpp.

fVec operator+ ( const fVec vec1,
const fVec vec2 
) [friend]

Definition at line 1574 of file fMatrix.cpp.

fVec operator- ( const fVec vec) [friend]

Definition at line 1531 of file fMatrix.cpp.

fVec operator- ( const fVec vec1,
const fVec vec2 
) [friend]

Definition at line 1590 of file fMatrix.cpp.

fVec operator/ ( const fVec vec,
double  d 
) [friend]

Definition at line 1605 of file fMatrix.cpp.

fVec unit ( const fVec v) [friend]

Returns a unit vector with the same direction (no length check!).

Definition at line 557 of file fMatrix.h.


The documentation for this class was generated from the following files:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:21