TVectorD


class description - source file - inheritance tree

class TVectorD : public TObject


    protected:
void Allocate(Int_t nrows, Int_t row_lwb = 0) void Invalidate() public:
TVectorD TVectorD() TVectorD TVectorD(Int_t n) TVectorD TVectorD(Int_t lwb, Int_t upb) TVectorD TVectorD(Int_t n, const Double_t* elements) TVectorD TVectorD(Int_t lwb, Int_t upb, const Double_t* elements) TVectorD TVectorD(const TVectorD& another) virtual void ~TVectorD() TVectorD& Abs() TVectorD& Apply(TElementActionD& action) TVectorD& Apply(TElementPosActionD& action) static TClass* Class() virtual void Draw(Option_t* option) Double_t* GetElements() const Double_t* GetElements() const Int_t GetLwb() const Int_t GetNoElements() const Int_t GetNrows() const Int_t GetUpb() const virtual TClass* IsA() const Bool_t IsValid() const Double_t Norm1() const Double_t Norm2Sqr() const Double_t NormInf() const Bool_t operator!=(Double_t val) const Double_t& operator()(Int_t index) const Double_t& operator()(Int_t index) TVectorD& operator*=(Double_t val) TVectorD& operator*=(const TMatrixD& a) TVectorD& operator+=(Double_t val) TVectorD& operator-=(Double_t val) Bool_t operator<(Double_t val) const Bool_t operator<=(Double_t val) const TVectorD& operator=(const TVectorD& source) TVectorD& operator=(Double_t val) TVectorD& operator=(const TMatrixDRow& mr) TVectorD& operator=(const TMatrixDColumn& mc) TVectorD& operator=(const TMatrixDDiag& md) Bool_t operator==(Double_t val) const Bool_t operator>(Double_t val) const Bool_t operator>=(Double_t val) const virtual void Print(Option_t* option) const void ResizeTo(Int_t n) void ResizeTo(Int_t lwb, Int_t upb) void ResizeTo(const TVectorD& v) void SetElements(const Double_t* elements) virtual void ShowMembers(TMemberInspector& insp, char* parent) TVectorD& Sqr() TVectorD& Sqrt() virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) TVectorD& Zero()

Data Members


    protected:
Int_t fNmem ! number of rows in allocated memory (>=fNrows) Int_t fNrows number of rows Int_t fRowLwb lower bound of the row index Double_t* fElements [fNrows] elements themselves

Class Description

                                                                      
 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 "TMatrixD A(TMatrixD::kTransposed,B);" and   
 other fancy constructors as much as possible. If one really needs    
 to return a matrix, return a TLazyMatrixD object instead. The        
 conversion is completely transparent to the end user, e.g.           
 "TMatrixD m = THaarMatrixD(5);" and _is_ efficient.                  
                                                                      
 For usage examples see $ROOTSYS/test/vmatrix.cxx and vvector.cxx     
 and also:                                                            
 http://root.cern.ch/root/html/TMatrixD.html#TMatrixD: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).

TVectorD(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:
 TVectorD foo(1,3,0.0,1.0,1.5,"END");

~TVectorD()
 TVectorD destructor.

void Draw(Option_t *option)
 Draw this vector using an intermediate histogram
 The histogram is named "TVectorD" by default and no title

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]| }.

TVectorD Abs()
 Take an absolute value of a vector, i.e. apply Abs() to each element.

TVectorD Sqr()
 Square each element of the vector.

TVectorD Sqrt()
 Take square root of all elements.

TVectorD Apply(TElementActionD &action)
 Apply action to each element of the vector.

TVectorD Apply(TElementPosActionD &action)
 Apply action to each element of the vector. In action the location
 of the current element is known.

void Print(Option_t *) const
 Print the vector as a list of elements.

void Streamer(TBuffer &R__b)
 Stream an object of class TVectorD.

TVectorD(Int_t n)

TVectorD(Int_t lwb, Int_t upb)

Bool_t IsValid() const

void SetElements(const Double_t *elements)

TVectorD(Int_t n, const Double_t *elements)

TVectorD(Int_t lwb, Int_t upb, const Double_t *elements)

TVectorD(const TVectorD &another) : TObject(another)

void ResizeTo(Int_t n)

void ResizeTo(const TVectorD &v)

TVectorD Zero()



Inline Functions


                   void Invalidate()
              Double_t& operator()(Int_t index) const
              Double_t& operator()(Int_t index)
                  Int_t GetLwb() const
                  Int_t GetUpb() const
                  Int_t GetNrows() const
                  Int_t GetNoElements() const
              Double_t* GetElements()
        const Double_t* GetElements() const
              TVectorD& operator=(const TVectorD& source)
              TVectorD& operator=(Double_t val)
              TVectorD& operator=(const TMatrixDRow& mr)
              TVectorD& operator=(const TMatrixDColumn& mc)
              TVectorD& operator=(const TMatrixDDiag& md)
              TVectorD& operator-=(Double_t val)
              TVectorD& operator+=(Double_t val)
              TVectorD& operator*=(Double_t val)
              TVectorD& operator*=(const TMatrixD& a)
                 Bool_t operator==(Double_t val) const
                 Bool_t operator!=(Double_t val) const
                 Bool_t operator<(Double_t val) const
                 Bool_t operator<=(Double_t val) const
                 Bool_t operator>(Double_t val) const
                 Bool_t operator>=(Double_t val) const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void StreamerNVirtual(TBuffer& b)


Author: Fons Rademakers 03/11/97
Last update: root/matrix:$Name: $:$Id: TVectorD.cxx,v 1.15 2002/09/15 10:16:44 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


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.