RealVec Class Reference

RealVec Class. More...

Inheritance diagram for RealVec:

Inheritance graph
[legend]
Collaboration diagram for RealVec:

Collaboration graph
[legend]
List of all members.

Constructors

 RealVec (u_int size)
 RealVec (u_int size, Real value)
 RealVec ()
 RealVec (RealVec &src, u_int idStart, u_int idEnd)
 RealVec (const Real *r, u_int dim)
 RealVec (const RealVec &orig)
RealVecoperator= (const RealVec &src)

Operations on RealVec

RealVecoperator<< (const Real &value)

Unary Operators

RealVecoperator- ()

Binary Operators

RealVecoperator+= (const RealVec &r)
RealVecoperator+= (const Real &r)
RealVecoperator-= (const RealVec &r)
RealVecoperator-= (const Real &r)
RealVecoperator *= (const RealVec &r)
RealVecoperator *= (const Real &r)
RealVecoperator/= (const RealVec &r)
RealVecoperator/= (const Real &r)
Real dot (const RealVec &r)

Math Functions

RealVecexp ()
RealVecscale (const Real v)
RealVecinv ()
Real norm ()
RealVecsquare ()
Real sum ()
RealVecnormalize ()
RealVecneg ()
void assign_xminusy (const RealVec &x, const RealVec &y)
void assign_minusx (const RealVec &x)
void assign_aminusx (Real a, const RealVec &x)
void assign_amulx (const Real a, const RealVec &x)
void assign_adivx (const Real a, const RealVec &x)
Real mean ()
int maxIndex ()
Real maxValue ()
int minIndex ()
Real minValue ()
RealVecstep (Real threshold)
RealVecdeltarule (Real rate, const RealVec &x, const RealVec &y)
static void createAllBinaries (RealVec *vector, unsigned long int pats, u_int dims)
static Real mse (const RealVec &target, const RealVec &actual)

Vector-Vector Operators

static RealMatoutprod (RealMat &m, const RealVec &x, const RealVec &y)

Protected Member Functions

Realrawdata () const

Detailed Description

Motivation
Description
Warnings


Constructor & Destructor Documentation

RealVec ( u_int  size  ) 

Construct an empty vector of dimension size

RealVec ( u_int  size,
Real  value 
)

Construct a vector of dimension size with all values set to value

RealVec (  ) 

Construct an empty vector with dimesion zero

RealVec ( RealVec src,
u_int  idStart,
u_int  idEnd 
)

Construct a RealVec view

RealVec ( const Real r,
u_int  dim 
)

Construct by copying data from const Real* vector

RealVec ( const RealVec orig  ) 

Copy-Constructor


Member Function Documentation

RealVec& operator= ( const RealVec src  )  [inline]

Assignement-operator

RealVec& operator<< ( const Real value  )  [inline]

Append Operator

RealVec& operator- (  )  [inline]

Operator -

RealVec& operator+= ( const RealVec r  )  [inline]

Operator += with RealVec

RealVec& operator+= ( const Real r  )  [inline]

Operator += with Real

RealVec& operator-= ( const RealVec r  )  [inline]

Operator -= with RealVec

RealVec& operator-= ( const Real r  )  [inline]

Operator -= with Real

RealVec& operator *= ( const RealVec r  )  [inline]

Operator *= with RealVec

RealVec& operator *= ( const Real r  )  [inline]

Operator *= with Real

RealVec& operator/= ( const RealVec r  )  [inline]

Operator /= with RealVec

RealVec& operator/= ( const Real r  )  [inline]

Operator /= with Real

Real dot ( const RealVec r  )  [inline]

Dot product

RealVec& exp (  ) 

Exponential

RealVec& scale ( const Real  v  )  [inline]

Scaling (scalar-vector multiply)

RealVec& inv (  ) 

Element Inversion

Real norm (  ) 

vector norm: ||x||

RealVec& square (  )  [inline]

Calculate the square of each element

Real sum (  )  [inline]

Return the sum of the vector's elements

RealVec& normalize (  )  [inline]

Normalize the vector, so the norm is equal to one

RealVec& neg (  )  [inline]

Not operation
It apply the operator '!' to all elements of RealVec

void assign_xminusy ( const RealVec x,
const RealVec y 
) [inline]

Equation: x-y

void assign_minusx ( const RealVec x  )  [inline]

Equation: -x

void assign_aminusx ( Real  a,
const RealVec x 
) [inline]

Equation: a-x

void assign_amulx ( const Real  a,
const RealVec x 
) [inline]

Equation: a*x

void assign_adivx ( const Real  a,
const RealVec x 
) [inline]

Equation: a/x

Real mean (  )  [inline]

Return the mean value of the vector's elements

int maxIndex (  )  [inline]

return the position of the maximum element in the vector

Real maxValue (  )  [inline]

return the value of the maximum element in the vector

int minIndex (  )  [inline]

return the position of the minimum element in the vector

Real minValue (  )  [inline]

return the value of the minimum element in the vector

RealVec& step ( Real  threshold  )  [inline]

For each element i, data[i] = 0 if data[i] <= threshold; data[i] = 1 otherwise

static void createAllBinaries ( RealVec vector,
unsigned long int  pats,
u_int  dims 
) [static]

Create all the binary vectors of a given dimension

static Real mse ( const RealVec target,
const RealVec actual 
) [static]

Return the mean square error of the vector's elements

RealVec& deltarule ( Real  rate,
const RealVec x,
const RealVec y 
) [inline]

Delta-Rule: r += rate * x * y
Add to itselt the scaled by rate of the element-by-element multiplication of x with y

Parameters:
rate is the scaling factor of multiplication
x is the first vector
y is the second vector

static RealMat& outprod ( RealMat m,
const RealVec x,
const RealVec y 
) [static]

Outer Product: m += x'*y
The x vector will be taken as a matrix of Rx1 dimension and y as a matrix of 1xC dimension, where RxC is the dimension of m

Parameters:
m the matrix result of multiplication
x the first vector; the dimesion must be the same of matrix's rows
y the second vector; the dimension must be the same of matrix's columns
Returns:
the matrix m

Real* rawdata (  )  const [inline, protected]

return the rawdata

Reimplemented from VectorData.


The documentation for this class was generated from the following file:
BerliOS Developer Logo Valid XHTML 1.0 Transitional Valid CSS!