Changeset 2752 in Sophya for trunk/SophyaLib/TArray/tvector.cc
- Timestamp:
- May 23, 2005, 6:18:17 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tvector.cc
r2719 r2752 1 // $Id: tvector.cc,v 1.1 8 2005-05-13 16:44:30 cmvExp $1 // $Id: tvector.cc,v 1.19 2005-05-23 16:18:17 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "sopnamsp.h" … … 91 91 } 92 92 93 //! Constructor from a TArray94 template <class T>95 TVector<T>::TVector(const TArray<T>& a)96 : TMatrix<T>(a)97 {98 if ( (size_[0] != 1) && (size_[1] != 1) )99 throw SzMismatchError("TVector<T>::TVector(const TArray<T>& a) NRows()!=1 && NCols()!=1 ");100 arrtype_ = 2; // Type = Vector101 }102 93 103 94 //! Constructor of a vector from a TArray \b a … … 105 96 \param a : TArray to be copied or shared 106 97 \param share : if true, share data. If false copy data 107 \param mm : define the memory mapping type108 98 \param lcv : line or column vector ? 109 99 \sa SelectVectorType 110 100 */ 111 101 template <class T> 112 TVector<T>::TVector(const TArray<T>& a, bool share, short lcv , short mm)113 : TMatrix<T>(a, share , mm)102 TVector<T>::TVector(const TArray<T>& a, bool share, short lcv) 103 : TMatrix<T>(a, share) 114 104 { 115 105 if ( (size_[0] != 1) && (size_[1] != 1) ) … … 202 192 else cr = relt; 203 193 TMatrix<T> const & mtx = (*this); 204 TVector sv( mtx(rr, cr) , true, GetVectorType() , GetMemoryMapping());194 TVector sv( mtx(rr, cr) , true, GetVectorType() ); 205 195 return(sv); 206 196 }
Note:
See TracChangeset
for help on using the changeset viewer.