User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
LqSystemC::LqSystemC(SizeT)
LqSystemC::LqSystemC(const LqSystemC &)
LqSystemC::Init(void)
LqSystemC::DataNumber(void)
LqSystemC::Copy(void) const
LqSystemC::Update(VectorC &,RealT)
LqSystemC::Roots(SizeT,RealT *)
LqSystemC::Errors(void)
LqSystemC::Im(void)
MatrixC::operator=(const MatrixC &)
MatrixC::Copy(void) const
MatrixC::IsValid(void) const
MatrixC::operator[](IndexT) const
MatrixC::operator[](IndexT)
MatrixC::Matrix(void) const
MatrixC::Matrix(void)
MatrixC::SubMatrix(const SizeT,const SizeT) const
MatrixC::GetDiag(void) const
MatrixC::GetRow(IndexT) const
MatrixC::GetColumn(IndexT) const
MatrixC::RDim(void) const
MatrixC::CDim(void) const
MatrixC::G(IndexT,IndexT) const
MatrixC::P(IndexT,IndexT)
MatrixC::ColumnModulus(IndexT) const
MatrixC::SubtractColumnFrom(IndexT,IndexT,RealT)
MatrixC::DivColumn(IndexT,RealT)
MatrixC::MakeUnitColumn(IndexT)
MatrixC::DotColumns(IndexT,IndexT) const
MatrixC::Fill(RealT)
MatrixC::SetZero(void)
MatrixC::SetRandom(RealT)
MatrixC::SetRandom(RealT,RealT)
MatrixC::SetDiag(const VectorC &)
MatrixC::SetRow(const IndexT,const VectorC &,const IndexT)
MatrixC::SetCol(const IndexT,const VectorC &,const IndexT)
MatrixC::SetRow(const IndexT,const IndexT,const VectorC &,const IndexT,const IndexT)
MatrixC::SetCol(const IndexT,const IndexT,const VectorC &,const IndexT,const IndexT)
MatrixC::SwapRows(const IndexT,const IndexT)
MatrixC::SwapCols(const IndexT,const IndexT)
MatrixC::SetSmallToBeZero(RealT)
MatrixC::EDiag(void)
MatrixC::operator+(const MatrixC &) const
MatrixC::operator-(const MatrixC &) const
MatrixC::operator+=(const MatrixC &)
MatrixC::operator+=(const RealT)
MatrixC::operator-=(const MatrixC &)
MatrixC::operator-=(const RealT)
MatrixC::operator*=(const RealT)
MatrixC::operator/=(const RealT)
MatrixC::operator*(const RealT) const
MatrixC::operator*(const VectorC &) const
MatrixC::operator*(const MatrixC &) const
MatrixC::AddDiag(const VectorC &)
MatrixC::MulDiag(const VectorC &)
MatrixC::DiagMul(const VectorC &)
MatrixC::MulT(const MatrixC &) const
MatrixC::TMul(const MatrixC &) const
MatrixC::T(void) const
MatrixC::Trace(void) const
MatrixC::I(void) const
MatrixC::NearSingularI(void)
MatrixC::InPlaceI(void)
MatrixC::OrgI(void) const
MatrixC::LUDecomposition(RealT &)
MatrixC::LUSolution(VectorC &)
MatrixC::SVD(VectorC &,MatrixC &,MatrixC &)
MatrixC::SVD(VectorC &,MatrixC &,const RealT)
MatrixC::OrgSVD(VectorC &,MatrixC &,const RealT)
MatrixC::SVD(const RealT)
MatrixC::Det(void)
MatrixC::IsSingular(void)
MatrixC::DiagonalProduct(void) const
MatrixC::WalshTransformation(const IntSArray1dC &,const IntSArray1dC &,IntT)
MatrixC::ColumnGramSchmidtOrthogonalization(void)
MatrixC::FixSmallToBeZero(RealT)
MatrixC::Identity(UIntT)
MatrixC::SumOfAbs(void) const
VectorC::Copy(void) const
VectorC::Vector(void) const
VectorC::Vector(void)
VectorC::Point(void) const
VectorC::Point(void)
VectorC::Dim(void) const
VectorC::SubVector(const SizeT) const
VectorC::SetZero(void)
VectorC::Set(RealT)
VectorC::SetLast(RealT)
VectorC::Set(const VectorC &)
VectorC::Set(const VectorC &,const IndexT)
VectorC::Set(const IndexT,const VectorC &,const IndexT)
VectorC::Set(const MatrixC &)
VectorC::SetUpperHalf(const MatrixC &)
VectorC::SetOddEven(const MatrixC &)
VectorC::SetOddEvenUpperHalf(const MatrixC &)
VectorC::SetRandom(void)
VectorC::SetRandom(RealT,RealT)
VectorC::Swap(IndexT,IndexT)
VectorC::Join(const VectorC &) const
VectorC::operator+(const VectorC &) const
VectorC::operator-(const VectorC &) const
VectorC::operator*(const RealT) const
VectorC::operator*(const VectorC &) const
VectorC::operator/(const RealT) const
VectorC::operator/(const VectorC &) const
VectorC::operator+=(const VectorC &)
VectorC::operator+=(const RealT)
VectorC::operator-=(const VectorC &)
VectorC::operator-=(const RealT)
VectorC::operator*=(const RealT)
VectorC::operator/=(const RealT)
VectorC::operator/=(const VectorC &)
VectorC::SetMul(const MatrixC &,const VectorC &)
VectorC::operator*=(const VectorC &)
VectorC::TMul(const VectorC &) const
VectorC::MulT(const VectorC &) const
VectorC::Dot(const VectorC &) const
VectorC::Cross(const VectorC &) const
VectorC::Cross3(const VectorC &) const
VectorC::OuterP(void) const
VectorC::OuterP(const VectorC &) const
VectorC::MakeUnit(void)
VectorC::Modulus(void) const
VectorC::SqrEuclidDistance(const VectorC &) const
VectorC::MaxIndex(void) const
VectorC::FirstSmallerIndex(const RealT) const
VectorC::FirstZeroIndex(void) const
VectorC::Sum(void) const
VectorC::Product(void) const
VectorC::Sqrt(void)
VectorC::Reciprocal(void)
VectorC::SortStraight(void)
VectorC::FixSmallToBeZero(RealT)
RealSArray1dC::Copy(void) const
RealSArray1dC::operator*(const RealT &) const
RealSArray1dC::operator+=(const RealSArray1dC &)
RealSArray1dC::operator-=(const RealSArray1dC &)
RealSArray1dC::operator*=(const RealT &)
RealSArray1dC::operator/=(const RealT &)
RealSArray1dC::SetZero(void)
RealSArray1dC::MaxValue(void) const
RealSArray1dC::MaxIndex(void) const
RealSArray1dC::MinIndex(void) const
RealSArray1dC::MaxAbsIndex(void) const
RealSArray1dC::Sum(void) const
RealSArray1dC::StraightSort(void)
RealSArray1dC::StraightSort(const SizeT)
RealSArray1dC::Join(const RealSArray1dC &) const
SArray1dC::Copy(void) const
SArray1dC::operator=(const SArray1dC &)
SArray1dC::SArray1d(void) const
SArray1dC::SArray1d(void)
SArray1dC::Enlarge(const IntT) const
SArray1dC::Append(const SArray1dC &)
SArray1dC::Join(const SArray1dC &) const
SArray1dC::DebugAddresses(void) const
SArray1dC::RefCounter(void) const
SArray1dC::Buffer(void)
SArray1dC::Buffer(void) const
SizeBufferAccessC::operator=(DataC *)
SizeBufferAccessC::ReferenceElm(void) const
SizeBufferAccessC::ReferenceVoid(void) const
SizeBufferAccessC::Access(void) const
SizeBufferAccessC::DataStart(void) const
SizeBufferAccessC::N(void) const
SizeBufferAccessC::Size(void) const
SizeBufferAccessC::Limits(void) const
SizeBufferAccessC::Range(void) const
SizeBufferAccessC::IMin(void) const
SizeBufferAccessC::IMax(void) const
SizeBufferAccessC::operator[](const IndexT) const
SizeBufferAccessC::operator[](const IndexT)
SizeBufferAccessC::SAccess(void) const
SizeBufferAccessC::IsEmpty(void) const
SizeBufferAccessC::Contains(const IndexT) const
SizeBufferAccessC::ShrinkHigh(const SizeT)
SizeBufferAccessC::Swap(SizeBufferAccessC &)
SizeBufferAccessC::Attach(const SizeBufferAccessC &)
SizeBufferAccessC::Attach(const BufferAccessC &,const SizeT)
SizeBufferAccessC::operator+(const SizeT) const
SizeBufferAccessC::Fill(const DataC &)
SizeBufferAccessC::CopyFrom(const SizeBufferAccessC &)
LqSystemC
 
System for incremental solving of linear equations system
 
include "amma/LqSystem.hh"
User Level:Default
Library:Mlalg
Example:exEndPoint.cc
Section:Numerical Methods
In Scope:std

Comments:

 -------- LQ system ---------------------
  
 VectorC weights of normalized dyads	
 MatrixC rows of m are dyads	

 M[i]'*M[i]= m[i]'*dm[i]*m[i]
 m[i]=[1,m1,m2,.....]
 ----------------------------------------
 adds new data to LQ

 see Kybernetika for detailed description

	      	[1,s12 . . .]
 system.m = 	|1,s22 . . .| prior to adding  
 	      	|1,s32 . . .| new data
  	      	|1,s42 . . .|
 	      	[1,s52 . . .]

 system.dm = 	[d1,d2,.....]

		[1,s12' .' .' .']
 system.m' = 	|1,s22' .' .' .'| after addition
		|1,s32' .' .' .'|
  	     	|1,s42' .' .' .'|
 	      	[1,s52' .' .' .']

 system.dm' =	[d1',d2',.....]
 

Parent Classes: Variables:
SizeT dataCounter;

Methods:
LqSystemC(SizeT coefNum)

LqSystemC(const LqSystemC & lq)

LqSystemC & Init()

SizeT DataNumber()

LqSystemC Copy() const

void Update(VectorC & v,RealT weight = 1.0)

VectorC Roots(SizeT coefNum,RealT * errV)

VectorC Errors()

ImSystemC Im()

#include "amma/Matrix.hh"
const MatrixC & operator=(const MatrixC & mat)
Assignment of a big object

MatrixC Copy() const

BooleanT IsValid() const
Returns TRUE if this matrix exists.

Access to the elements


const SizeBufferAccessC<RealT> operator[](IndexT r) const
Access to the row of the constant matrix

SizeBufferAccessC<RealT> operator[](IndexT r)
Access to the row of the matrix

const MatrixC & Matrix() const
Access to the constant matrix

MatrixC & Matrix()
Access to the matrix

MatrixC SubMatrix(const SizeT sr,const SizeT sc) const
Returns the submatrix created from the first 'sr' rows and 'sc' columns of this matrix.
This makes a copy of the matrix elements specified.

VectorC GetDiag() const
Creates the vector of the diagonal elements

VectorC GetRow(IndexT r) const
Creates the vector of elements of the row 'r'.

VectorC GetColumn(IndexT c) const
Creates the vector of elements of the column 'c'.

SizeT RDim() const
Return the number of rows

SizeT CDim() const
Return the number of columns

RealT G(IndexT r,IndexT c) const
Get the value

RealT & P(IndexT r,IndexT c)
Put the value

RealT ColumnModulus(IndexT c) const
Returns the modulus of the column 'c'.

void SubtractColumnFrom(IndexT c1,IndexT c2,RealT a)
Subtracts the column 'c2' multiplied by the parameter 'a' from the column 'c1'.

void DivColumn(IndexT c,RealT val)
Divides the column 'c' by the value val.

RealT MakeUnitColumn(IndexT c)
Divides the column 'c' by its modulus. Returns its original modulus.

RealT DotColumns(IndexT c1,IndexT c2) const
Returns the dot product of columns 'c1' and 'c2'.

Set element values


void Fill(RealT val)
Fill matrix with value 'val'

MatrixC & SetZero()
set all elements to be zero

MatrixC & SetRandom(RealT scale = 1)
set all elements to be random value, between 0 and 'scale'.

MatrixC & SetRandom(RealT lo,RealT hi)
set all elements to uniformly random between lo and hi

MatrixC & SetDiag(const VectorC & vec)
set the diagonal elements according to vec

MatrixC & SetRow(const IndexT r,const VectorC & vec,const IndexT n)
Sets the first 'n' elements of the row 'r' according to the first 'n' elements of the vector 'vec'.

MatrixC & SetCol(const IndexT c,const VectorC & vec,const IndexT n)
Sets the first 'n' elements of the column 'c' according to the first 'n' elements of the vector 'vec'.

MatrixC & SetRow(const IndexT r,const IndexT c,const VectorC & vec,const IndexT s1,const IndexT s2)
Sets the elements of the row 'r' starting at the column 'c' according to the elements of the vector 'vec' with the indexes in the range .

MatrixC & SetCol(const IndexT r,const IndexT c,const VectorC & vec,const IndexT s1,const IndexT s2)
Sets the elements of the column 'c' starting at the row 'r' according to the elements of the vector 'vec' with the indexes in the range .

MatrixC & SwapRows(const IndexT r1,const IndexT r2)
Swaps the row 'r1' and 'r2'.

MatrixC & SwapCols(const IndexT c1,const IndexT c2)
Swaps the columns 'c1' and 'c2'.

MatrixC & SetSmallToBeZero(RealT thr)
Set all elements smaller than 'thr' to be zero.

MatrixC & EDiag()
Set all diagonal elements to be 1.0

Arithmetic operators


MatrixC operator+(const MatrixC & mat) const
Sum 2 matrixes "MatrixC" = "This" + mat

MatrixC operator-(const MatrixC & mat) const
Subtract 2 matrixes "MatrixC" = "This" - mat

MatrixC & operator+=(const MatrixC & mat)
Add the matrix "mat": "This" = "This" + mat

MatrixC & operator+=(const RealT alpha)
Add scalar to each element of matrix i.e. "mat": "This" = "This" + alpha

MatrixC & operator-=(const MatrixC & mat)
Subtract the matrix "mat": "This" = "This" - mat

MatrixC & operator-=(const RealT alpha)
Subtract scalar from each element in the matrix "mat": "This" = "This" - alpha

MatrixC & operator*=(const RealT a)
Multiplication "Matrix" = "Matrix" * "Scalar"

MatrixC & operator/=(const RealT a)
Division "Matrix" = "Matrix" / "Scalar"

MatrixC operator*(const RealT a) const
Multiply this matrix by the scalar 'a'.

VectorC operator*(const VectorC & vector) const
Multiplication "VectorC" = "This" * vector

MatrixC operator*(const MatrixC & mat) const
Multiplication "result" = "this" * "mat"

MatrixC & AddDiag(const VectorC & v)
Adds the diagonal matrix represented by the vector 'v' (m = m + v).

MatrixC & MulDiag(const VectorC & v)
Multiplies the matrix from the right by the diagonal matrix represented by the vector 'v' (m = m * v).

MatrixC & DiagMul(const VectorC & v)
Multiplies the matrix from the left by the diagonal matrix represented by the vector 'v' (m = v * m).

MatrixC MulT(const MatrixC & mat) const
Multiplication A * B.T()

MatrixC TMul(const MatrixC & mat) const
Multiplication A.T() * B

MatrixC T() const
Returns the transposition of this matrix.

RealT Trace() const
Returns the trace of this matrix.

Matrix inversion and decomposition


MatrixC I() const
Returns the inversion of this matrix.
Uses the algorithm from InPlaceI(), unless matrix is non-square, in which case OrgI() is called. The original matrix is preserved, however.

RealT NearSingularI()
Inverts this matrix and returns determinant of original matrix.
This routine is particularly useful when you matrices are near singular as it uses PCA to first rotate co-ordinate axis, so no nasty divisions. See Fukunaga -Introduction to Statistical Pat Rec, page 40.

RealT InPlaceI()
Replaces the original matrix with its inverse, and returns its determinant.
Uses the in-place Gauss-Jordan elimination method.

MatrixC OrgI() const
Returns the inversion of this matrix.
Radek's original inversion routine. Does something even with non-square matrices.

IntSArray1dC LUDecomposition(RealT & d)
This function replaces this matrix by the LU decomposition of a row-wise permutation of itself.
The lower triangle submatrix has got the diagonal unity elements. The returned index array records the row permutation effected by the partial pivoting. 'd' is output as +-1 depending on whether the number of row interchanges was even or odd, respectively.

VectorC LUSolution(VectorC & rightSide)
Returns the vector X that is the solution of the linear system described by the matrix equation A*X=B, where A is this matrix, and the vector B is equal to the vector 'rightSide'.
The method used is the LU decomposition.
BUG: NOT IMPLEMENTED

void SVD(VectorC & d,MatrixC & u,MatrixC & v)
Singular value decomposition. DO NOT USE. It does not work.

void SVD(VectorC & d,MatrixC & v,const RealT isSmall = 1e-8)
Singular value decomposition, eg. M = U * D * V.T().
The function changes the input matrix M to U. The diagonal matrix D is returned as the vector 'd' and the matrix V is returned as the matrix 'v'. Both object 'd' and 'v' are supposed to have the proper size.

void OrgSVD(VectorC & d,MatrixC & v,const RealT isSmall = 1e-8)
The original NR SVD. (Default).

VecMatC SVD(const RealT isSmall = 1e-8)
Singular value decomposition, eg. M = U * D * V.T().
The function changes the input matrix M to U. The diagonal matrix D is returned as the vector in the result object and the matrix V is returned as the matrix in the result object. The singular values are not ordered. The effect of isSmall is not known in detail to CG or AJS It is provided as a feature for experimentation - if interested users should perhaps consult the Numerical Recipes Book At a rough guess decreasing this number will give a more accurate result, but it might not converge?

RealT Det()
Returns the determinant of this matrix. The matrix is changed.

BooleanT IsSingular()
Returns TRUE if the matrix is singular.
The SVD is used for computation of the determinant. The matrix is changed.
BUG: DO NOT TRUST

Miscellaneous


RealT DiagonalProduct() const
Returns the product of the diagonal elements.

MatrixC & WalshTransformation(const IntSArray1dC & lbr,const IntSArray1dC & lbc,IntT ifun)
2D Walsh-Hadamard transformation
lbr bit-reversal field of the size RDim()
lbc bit-reversal field of the size CDim()
ifunType of ordering (I),
IFUN=1
Hadamard ordering
IFUN=2 ... Walsh ordering

MatrixC & ColumnGramSchmidtOrthogonalization()
Performs Gram-Schmidt orthogonalisation of columns of this matrix.

MatrixC & FixSmallToBeZero(RealT thr = 1e-12)
All elements whose absolute values are smaller than 'thr' are changed to be zero.

MatrixC Identity(UIntT size)
Construct an identity matrix of size * size.

RealT SumOfAbs() const
Sum of the absolute value of all the elements of the matrix.

#include "amma/Vector.hh"
VectorC Copy() const
physical copy of the object
Access to the element, to the vector. -------------------------------------

const VectorC & Vector() const
access to the constant object

VectorC & Vector()
access to the object

const VectorC & Point() const
access to the constant object

VectorC & Point()
access to the object

SizeT Dim() const
returns the number of items in the vector.

VectorC SubVector(const SizeT n) const
Returns the subvector created from the first 'n' elements of this vector. Set elements. -------------

VectorC & SetZero()
set all vector items to be 0

VectorC & Set(RealT x)
sets vector items to x

VectorC & SetLast(RealT f)
set the last element to be 'f'

VectorC & Set(const VectorC & vec)
set vector according to another one

VectorC & Set(const VectorC & vec,const IndexT n)
Sets the first 'n' items of this vector according to the vector 'vec'.

VectorC & Set(const IndexT i,const VectorC & vec,const IndexT n)
Sets the first 'n' items beginning from the i-th one of this vector according to the vector 'vec'.

VectorC & Set(const MatrixC & mat)
set items according to "mat" items

VectorC & SetUpperHalf(const MatrixC & mat)
set items according to "mat" items in its upper half

VectorC & SetOddEven(const MatrixC & mat)
set items according to "mat" items with odd or even indexes only

VectorC & SetOddEvenUpperHalf(const MatrixC & mat)
set items according to "mat" items with odd or even indexes only in its upper half

VectorC & SetRandom()
set elements to be random

VectorC & SetRandom(RealT lo,RealT hi)
set elements to be uniformly random between lo and hi

VectorC & Swap(IndexT i,IndexT j)
Swaps the elements with the indexex 'i' and 'j'.

VectorC Join(const VectorC & Oth) const
Joint *this and 'Oth' vector into a new larger vector. The new vector contains this vector first followed by the 'Oth' vector. Arithmetic Operations. ----------------------

VectorC operator+(const VectorC & b) const
Returns the sum of two vectors.

VectorC operator-(const VectorC & b) const
Returns the diference between this vector and the vector 'b'.

VectorC operator*(const RealT alfa) const
Returns the multiplication of this vector by the scalar 'alpha'.

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

VectorC operator/(const RealT alfa) const
Returns the division of this vector by the scalar 'alpha'.

VectorC operator/(const VectorC & b) const
Returns the vector whose elements are the results of division of this vector by the vector 'b' element by element.

VectorC & operator+=(const VectorC & b)
add the vector 'b' to the vector

VectorC & operator+=(const RealT alpha)
add the scalar to each element of the vector

VectorC & operator-=(const VectorC & b)
subtract the vector 'b' from the vector

VectorC & operator-=(const RealT alpha)
subtract the scalar from each element of the vector

VectorC & operator*=(const RealT alpha)
multiply the vector by the scalar 'alpha'

VectorC & operator/=(const RealT alpha)
divide the vector by the scalar 'alpha'

VectorC & operator/=(const VectorC & vec)
(*this)[index] = (*this)[index]/vec[index]

VectorC & SetMul(const MatrixC & mat,const VectorC & vec)
the vector is the result of the multiplication 'mat' * 'vec'

VectorC & operator*=(const VectorC & b)
multiplication (*this)[i] *= b[i]

RealT TMul(const VectorC & b) const
multiplication 'RealT' = (*this).T() * b

MatrixC MulT(const VectorC & b) const
Multiplication 'MatrixC' = (*this) * b.T(). Vector Operations. ------------------

RealT Dot(const VectorC & v) const
scalar product of vectors

VectorC Cross(const VectorC & v) const
vector product of vectors

RealT Cross3(const VectorC & v) const
3rd coor of crossproduct

MatrixC OuterP() const
The outer product of this vector with itself. In fact, the implementation is the same one for the member function MulT().

MatrixC OuterP(const VectorC & b) const
In fact, the implementation is the same one for the member function MulT().

RealT MakeUnit()
The vector is divided by its modulus. The original modulus is returned.

RealT Modulus() const
modulus of the vector

RealT SqrEuclidDistance(const VectorC & point) const
Returns the square of Euclid distance between this point and 'point'. Useful functions. -----------------

IndexT MaxIndex() const
Returns the index of the maximum element.

IndexT FirstSmallerIndex(const RealT thr) const
Returns the index of the first element which is smaller than the threshold 'thr'. If the vector does not contain an element smaller than 'thr' the return value is set to be a size of the vector (the index of the last element + 1).

IndexT FirstZeroIndex() const
Returns the index of the first zero element. If the vector does not contain an zero element the return value is set to be a size of the vector (the index of the last element +1).

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

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

VectorC & Sqrt()
All elements of the vector are changed to their square root values. It is assumed that all elements of the vector are positive or zero.

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

VectorC SortStraight()
The map of indexes is returned.

VectorC & FixSmallToBeZero(RealT thr = 1e-12)
All element whose absolute value is smaller than 'thr' are changed to be zero.

#include "amma/ReSArr1.hh"
RealSArray1dC Copy() const
Creates a new physical copy of the real array. Special operations. -------------------

RealSArray1dC operator*(const RealT & r) const
Multiples every item of the array by the real number 'r'.

const RealSArray1dC & operator+=(const RealSArray1dC & arr)
Adds the array 'arr' to this array. The operation is performed on the overlapping part of the arrays only. The function returns this array.

const RealSArray1dC & operator-=(const RealSArray1dC & arr)
Subtracts the array 'arr' to this array. The operation is performed on the overlapping part of the arrays only. The function returns this array.

const RealSArray1dC & operator*=(const RealT & r)
Multiplies each element of this array by the real number 'r'.

const RealSArray1dC & operator/=(const RealT & r)
Divides each element of this array by the real number 'r'.

void SetZero()
Sets all items of the array to be zero.

RealT MaxValue() const
Returns the maximum value saved in the array.

IndexT MaxIndex() const
Returns the index of the maximum value.

IndexT MinIndex() const
Returns the index of the minimum value.

IndexT MaxAbsIndex() const
Returns the index of the maximum absolute value.

RealT Sum() const
Returns the sum of all elements in the array.

RealSArray1dC & StraightSort()
Sorts the array into ascending numerical order by straight insertion. It is an N^2 routine, and should only be used for small N, say < 50.

RealSArray1dC & StraightSort(const SizeT n)
Sorts the first n element of the array into ascending numerical order by straight insertion. It is an N^2 routine, and should only be used for small 'n', say < 50.

RealSArray1dC Join(const RealSArray1dC & it) const
Join this array with another.

#include "amma/SArray1d.hh"
SArray1dC<RealT> Copy() const
Creates a new physical copy of the array.

const SArray1dC<RealT> & operator=(const SArray1dC<RealT> & vv)
Assigment, as for a BIG_OBJECT. Access to the object and its parts. -----------------------------------

const SArray1dC<RealT> & SArray1d() const
Access to the whole constant array.

SArray1dC<RealT> & SArray1d()
Access to the whole array. Modifications of the representation -----------------------------------

SArray1dC<RealT> Enlarge(const IntT factor = 2) const
Enlarges the array by item duplications. Every item is duplicated 'factor' times. The return array is extended by adding of higher indexes.

SArray1dC<RealT> & Append(const SArray1dC<RealT> & a)
This array is extended by the length of the array 'a' and the contents of both arrays are copied to it. The function supports empty arrays.

SArray1dC<RealT> Join(const SArray1dC<RealT> & Oth) const
Join this Array and another into a new Array which is returned. This does not change either of its arguments. This is placed in the array first, followed by 'Oth'. Special operations ------------------

void DebugAddresses() const
Prints addresses into 'cerrAMMA'.

const BodyRefCounterC & RefCounter() const
Returns access to reference counter.

BufferRC<RealT> & Buffer()
Access base data buffer.
Experts only.

const BufferRC<RealT> & Buffer() const
Constant access base data buffer.
Experts only.

#include "amma/SBfAcc.hh"
const SizeBufferAccessC<RealT> & operator=(RealT * bp)
Changes the reference element to the element pointed by 'bp'. Access to the object --------------------

RealT * ReferenceElm(void) const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer.

void * ReferenceVoid(void) const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer. The function is intended to be used in printing.

const BufferAccessC<RealT> & Access(void) const
Returns this object.

RealT * DataStart() const
Returns the address of the first element of the buffer.

SizeT N() const
Returns the number of elements of the array.

SizeT Size() const
Returns the number of elements of the array.

const BufferSizeC & Limits() const
Returns the usable range of indeces expressed by this object.

const BufferSizeC & Range() const
Returns the usable range of indeces expressed by this object.

IndexT IMin() const
Returns the minimum index of the range of this access.

IndexT IMax() const
Returns the maximum index of the range of this access.

const RealT & operator[](const IndexT i) const
Read-only access to the ('i'+1)-th element of the buffer.

RealT & operator[](const IndexT i)
Read-write access to the ('i'+1)-th element of the buffer.

const SizeBufferAccessC<RealT> & SAccess(void) const
Returns this object. Logical functions -----------------

BooleanT IsEmpty() const
Returns TRUE if the size of the array is zero.

BooleanT Contains(const IndexT i) const
Returns TRUE if the array contains an item with the index 'i'. Modifications of the access ---------------------------

const BufferSizeC & ShrinkHigh(const SizeT k)
Changes the number of elements by subtracting the last 'k' elements.

const SizeBufferAccessC<RealT> & Swap(SizeBufferAccessC<RealT> & a)
Exchanges the contents of this buffer with buffer 'a'.

void Attach(const SizeBufferAccessC<RealT> & b)
Changes this buffer access to have the same access rights as 'b'.

void Attach(const BufferAccessC<RealT> & b,const SizeT size)
Changes this buffer access to have the access rights as 'b' limited for 'size' elements.

SizeBufferAccessC<RealT> operator+(const SizeT i) const
Creates the new access object shifted 'i' elements to the right (towards next elements). The size is descreased to fit the the original range of this access. Modifications of the buffer contents ------------------------------------

void Fill(const RealT & d)
'd' value is assigned to all elements of the buffer.

void CopyFrom(const SizeBufferAccessC<RealT> & oth)
Copy contents of another buffer into this one.
NB. Buffers MUST be the same length.


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001