TVector
class description - source file - inheritance tree
protected:
void Allocate(Int_t nrows, Int_t row_lwb = 0)
void Invalidate()
public:
TVector TVector()
TVector TVector(Int_t n)
TVector TVector(Int_t lwb, Int_t upb)
TVector TVector(TVector& another)
virtual void ~TVector()
TVector& Abs()
TVector& Apply(TElementAction& action)
TVector& Apply(TElementPosAction& action)
TClass* Class()
Int_t GetLwb()
Int_t GetNoElements()
Int_t GetNrows()
Int_t GetUpb()
virtual TClass* IsA()
Bool_t IsValid()
Double_t Norm1()
Double_t Norm2Sqr()
Double_t NormInf()
Bool_t operator!=(Real_t val)
Real_t& operator()(Int_t index)
TVector& operator*=(Double_t val)
TVector& operator*=(TMatrix& a)
TVector& operator+=(Double_t val)
TVector& operator-=(Double_t val)
Bool_t operator<(Real_t val)
Bool_t operator<=(Real_t val)
TVector& operator=(TVector& source)
TVector& operator=(Real_t val)
TVector& operator=(TMatrixRow& mr)
TVector& operator=(TMatrixColumn& mc)
TVector& operator=(TMatrixDiag& md)
Bool_t operator==(Real_t val)
Bool_t operator>(Real_t val)
Bool_t operator>=(Real_t val)
virtual void Print(Option_t* option)
void ResizeTo(Int_t n)
void ResizeTo(Int_t lwb, Int_t upb)
void ResizeTo(TVector& v)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
TVector& Sqr()
TVector& Sqrt()
virtual void Streamer(TBuffer& b)
TVector& Zero()
protected:
Int_t fNrows number of rows
Int_t fRowLwb lower bound of the row index
Real_t* fElements elements themselves
Linear Algebra Package
The present package implements all the basic algorithms dealing
with vectors, matrices, matrix columns, rows, diagonals, etc.
Matrix elements are arranged in memory in a COLUMN-wise
fashion (in FORTRAN's spirit). In fact, it makes it very easy to
feed the matrices to FORTRAN procedures, which implement more
elaborate algorithms.
Unless otherwise specified, matrix and vector indices always start
with 0, spanning up to the specified limit-1.
The present package provides all facilities to completely AVOID
returning matrices. Use "TMatrix A(TMatrix::kTransposed,B);" and
other fancy constructors as much as possible. If one really needs
to return a matrix, return a TLazyMatrix object instead. The
conversion is completely transparent to the end user, e.g.
"TMatrix m = THaarMatrix(5);" and _is_ efficient.
For usage examples see $ROOTSYS/test/vmatrix.cxx and vvector.cxx
and also:
http://root.cern.ch/root/html/TMatrix.html#TMatrix:description
The implementation is based on original code by
Oleg E. Kiselyov (oleg@pobox.com).
void Allocate(Int_t nrows, Int_t row_lwb)
Allocate new vector. Arguments are number of rows and row
lowerbound (0 default).
TVector(Int_t lwb, Int_t upb, Double_t va_(iv1), ...)
Make a vector and assign initial values. Argument list should contain
Double_t values to assign to vector elements. The list must be
terminated by the string "END". Example:
TVector foo(1,3,0.0,1.0,1.5,"END");
~TVector()
TVector destructor.
void ResizeTo(Int_t lwb, Int_t upb)
Resize the vector for a specified number of elements, trying to keep
intact as many elements of the old vector as possible. If the vector is
expanded, the new elements will be zeroes.
Double_t Norm1() const
Compute the 1-norm of the vector SUM{ |v[i]| }.
Double_t Norm2Sqr() const
Compute the square of the 2-norm SUM{ v[i]^2 }.
Double_t NormInf() const
Compute the infinity-norm of the vector MAX{ |v[i]| }.
void Print(Option_t *)
Print the vector as a list of elements.
void Streamer(TBuffer &R__b)
Stream an object of class TVector.
TVector(Int_t n)
TVector(Int_t lwb, Int_t upb)
Bool_t IsValid() const
TVector(const TVector &another)
void ResizeTo(Int_t n)
void ResizeTo(const TVector &v)
Inline Functions
void Invalidate()
Real_t& operator()(Int_t index)
Int_t GetLwb()
Int_t GetUpb()
Int_t GetNrows()
Int_t GetNoElements()
TVector& operator=(TVector& source)
TVector& operator=(Real_t val)
TVector& operator=(TMatrixRow& mr)
TVector& operator=(TMatrixColumn& mc)
TVector& operator=(TMatrixDiag& md)
TVector& operator-=(Double_t val)
TVector& operator+=(Double_t val)
TVector& operator*=(Double_t val)
TVector& operator*=(TMatrix& a)
Bool_t operator==(Real_t val)
Bool_t operator!=(Real_t val)
Bool_t operator<(Real_t val)
Bool_t operator<=(Real_t val)
Bool_t operator>(Real_t val)
Bool_t operator>=(Real_t val)
TVector& Zero()
TVector& Abs()
TVector& Sqr()
TVector& Sqrt()
TVector& Apply(TElementAction& action)
TVector& Apply(TElementPosAction& action)
TClass* Class()
TClass* IsA()
void ShowMembers(TMemberInspector& insp, char* parent)
Author: Fons Rademakers 05/11/97
Last update: 2.20/00 13/11/98 18.44.30 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.