Changeset 2267 in Sophya for trunk/SophyaLib/TArray/tvector.cc
- Timestamp:
- Nov 15, 2002, 10:35:44 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tvector.cc
r1624 r2267 1 // $Id: tvector.cc,v 1.1 4 2001-08-06 22:48:43 cmvExp $1 // $Id: tvector.cc,v 1.15 2002-11-15 09:35:44 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 9 9 \class SOPHYA::TVector 10 10 \ingroup TArray 11 Class of vector (line or column) 12 \sa TMatrix TArray 13 */ 11 12 The TVector class specializes the TMatrix class for representing 13 row or column vectors. 14 15 \b Vector is a typedef for double precision floating point vectors ( TVector<r_8> ). 16 17 \sa SOPHYA::TArray SOPHYA::TMatrix 18 \sa SOPHYA::Range SOPHYA::Sequence 19 \sa SOPHYA::MathArray 20 21 The following sample code illustrates sub-vector manipulation: 22 \code 23 #include "array.h" 24 // ... 25 // Input Vector containing a noisy periodic signal 26 Vector in(1024), out(1024); 27 in = RandomSequence(RandomSequence::Gaussian, 0., 1.); 28 for(int kk=0; kk<in.Size(); kk++) 29 in(kk) += 2*sin(kk*0.05); 30 // Compute the output vector by a simple low pass filter 31 Vector out(1024); 32 int w = 2; 33 for(int k=w; k<in.Size()-w; k++) 34 out(k) = in(Range(k-w, k+w).Sum()/(2.*w+1.); 35 \endcode 36 */ 14 37 15 38 ////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.