Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Arrays - Slice1dC<class DataT>
 

  PUBLIC
Slice1dC::Slice1dC(void)
Slice1dC::Slice1dC(SizeT)
Slice1dC::Slice1dC(const IndexRangeC &)
Slice1dC::Slice1dC(BufferC &,SizeT,UIntT,IntT)
Slice1dC::Slice1dC(BufferC &,DataT *,SizeT,IntT)
Slice1dC::Slice1dC(BufferC &,DataT *,IndexRangeC,IntT)
Slice1dC::Size(void) const
Slice1dC::Copy(void) const
Slice1dC::Fill(const DataT &)
Slice1dC::operator [](IndexC)
Slice1dC::operator [](IndexC) const
Slice1dC::First(void)
Slice1dC::First(void) const
Slice1dC::Last(void)
Slice1dC::Last(void) const
Slice1dC::Stride(void) const
Slice1dC::operator +(const Slice1dC &) const
Slice1dC::operator -(const Slice1dC &) const
Slice1dC::operator *(const DataT &) const
Slice1dC::operator *(const Slice1dC &) const
Slice1dC::operator +=(const Slice1dC &)
Slice1dC::operator +=(const DataT &)
Slice1dC::operator -=(const Slice1dC &)
Slice1dC::operator -=(const DataT &)
Slice1dC::operator *=(const DataT &)
Slice1dC::operator /=(const DataT &)
Slice1dC::operator /=(const Slice1dC &)
Slice1dC::Sum(void) const
Slice1dC::Product(void) const
Slice1dC::SumOfSqr(void) const
Slice1dC::Reciprocal(void)
Slice1dC::Modulus(void) const
Slice1dC::TMul(const Slice1dC &) const
Slice1dC::Dot(const Slice1dC &) const
Slice1dC::Buffer(void)
Slice1dC::Buffer(void) const
Slice1dC::Range(void) const

   Slice1dC<class DataT>   
 
Slice through array
 
include "Ravl/Slice1d.hh"
Created:24/01/2001 
Source file:Ravl/Core/Container/Buffer/Slice1d.hh
User Level:Advanced
Library:RavlCore
In Scope:RavlN

Comments:
Slices are NOT simple arrays, they have an additional paramiter 'stride' which allows them to access both rows and columbs of block matrixes equally. This intended to support numerical types, operations on the vector are implemented as would be expected

Variables:
IndexRangeC rng;
Range of valid index's

IntT stride;
Stride of data.

DataT * ref;
Ptr to element 0

BufferC buffer;

Methods:
Slice1dC()
Creates a zero length vector.

Slice1dC(SizeT nsize)
Allocate a vector of size 'nsize'

Slice1dC(const IndexRangeC & nrng)
Allocate a Slice with a range of 'nrng'

Slice1dC(BufferC<DataT> & buff,SizeT size,UIntT off,IntT stride = 1)
Attach a vector to a buffer.
buff - Buffer in which data is held. size - Number of elements in the slice. off - Offset into buffer of first element. stride - distance between successive elements in slice. Element 0 is at 'off' in buffer, and use the given stride.

Slice1dC(BufferC<DataT> & buff,DataT * refElm,SizeT size,IntT stride = 1)
Attach a vector to a buffer.
buff - Buffer in which data is held. size - Number of elements in the slice. refElm - Pointer to first element in the slice. stride - distance between successive elements in slice. Element 0 is at 'refElm' in buffer, and use the given stride.

Slice1dC(BufferC<DataT> & buff,DataT * refElm,IndexRangeC range,IntT stride = 1)
Attach a vector to a buffer.
buff - Buffer in which data is held. refElm - Pointer to element 0 in the slice. (even if its not in 'range') range - Range of indexes to map data to. stride - distance between successive elements in slice. Element '*refElm' is at index 0 in buffer, and use the given stride.

SizeT Size() const
Size of vector.

Slice1dC Copy() const
Make copy of vector.

void Fill(const DataT & val)
Fill vector with value 'val'

DataT & operator [](IndexC i)
Access element i in vector.

const DataT & operator [](IndexC i) const
Constant access to element i in vector.

DataT & First()
Access first element in the vector.
Not the results of this function is undefined if Size() is zero.

const DataT & First() const
Access first element in the vector.
Not the results of this function is undefined if Size() is zero.

DataT & Last()
Access last element in vector.

const DataT & Last() const
Access last element in vector.

IntT Stride() const
Access stride of vector.

Slice1dC<DataT> operator +(const Slice1dC<DataT> & b) const
Returns the sum of two vectors.

Slice1dC<DataT> operator -(const Slice1dC<DataT> & b) const
Returns the diference between this vector and the vector 'b'.

Slice1dC<DataT> operator *(const DataT & alfa) const
Returns the multiplication of this vector by the scalar 'alpha'.

Slice1dC<DataT> operator *(const Slice1dC<DataT> & b) const
Returns the vector whose elements are the results of multiplication of this vector by the vector 'b' element by element.

Slice1dC<DataT> & operator +=(const Slice1dC<DataT> & b)
add the vector 'b' to the vector

Slice1dC<DataT> & operator +=(const DataT & alpha)
add the scalar to each element of the vector

Slice1dC<DataT> & operator -=(const Slice1dC<DataT> & b)
subtract the vector 'b' from the vector

Slice1dC<DataT> & operator -=(const DataT & alpha)
subtract the scalar from each element of the vector

Slice1dC<DataT> & operator *=(const DataT & alpha)
multiply the vector by the scalar 'alpha'

Slice1dC<DataT> & operator /=(const DataT & alpha)
divide the vector by the scalar 'alpha'

Slice1dC<DataT> & operator /=(const Slice1dC<DataT> & vec)
(*this)[index] = (*this)[index]/vec[index]

DataT Sum() const
Returns the sum all elements of the vector.

DataT Product() const
Returns the product of all elements of the vector.

DataT SumOfSqr() const
Returns the sum of the squares of all the elements of the vector.

Slice1dC<DataT> & Reciprocal()
All elements of the vector are changed to their reciprocal values. It is assumed that all elements of the vector differs from zero.

RealT Modulus() const
Returns the modulus of the vector.
The Sqrt(SumOfSqr()).

DataT TMul(const Slice1dC<DataT> & b) const
multiplication 'DataT' = (*this).T() * b

DataT Dot(const Slice1dC<DataT> & v) const
scalar product of vectors

BufferC<DataT> & Buffer()
Access the raw buffer

const BufferC<DataT> & Buffer() const
Access the raw buffer.

const IndexRangeC & Range() const
Access range of valid indexs.


Maintainer:Charles Galambos, Created: 24/01/2001, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002