Changeset 1099 in Sophya for trunk/SophyaLib/TArray/tvector.cc
- Timestamp:
- Jul 26, 2000, 6:29:46 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tvector.cc
r976 r1099 1 // $Id: tvector.cc,v 1. 8 2000-04-27 17:53:52ansari Exp $1 // $Id: tvector.cc,v 1.9 2000-07-26 16:29:46 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 35 35 : TMatrix<T>(1,1,mm) 36 36 { 37 arrtype_ = 2; // Type = Vector 37 38 lcv = SelectVectorType(lcv); 38 39 ReSize(n,lcv); … … 49 50 : TMatrix<T>(a) 50 51 { 52 arrtype_ = 2; // Type = Vector 51 53 } 52 54 … … 60 62 : TMatrix<T>(a, share) 61 63 { 64 arrtype_ = 2; // Type = Vector 62 65 } 63 66 … … 69 72 if ( (size_[0] != 1) && (size_[1] != 1) ) 70 73 throw SzMismatchError("TVector<T>::TVector(const TArray<T>& a) NRows()!=1 && NCols()!=1 "); 74 arrtype_ = 2; // Type = Vector 71 75 } 72 76 … … 86 90 if ( (size_[0] != 1) && (size_[1] != 1) ) 87 91 throw SzMismatchError("TVector<T>::TVector(const TArray<T>& a) NRows()!=1 && NCols()!=1 "); 92 arrtype_ = 2; // Type = Vector 88 93 if ( (size_[0] == 1) && (size_[1] == 1) ) { 89 94 if (lcv == SameVectorType) lcv = a.GetVectorType(); … … 91 96 veceli_ = (lcv == ColumnVector ) ? marowi_ : macoli_; 92 97 } 98 } 99 100 //! Constructor of a vector from a TArray \b a , with a different data type 101 template <class T> 102 TVector<T>::TVector(const BaseArray& a) 103 : TMatrix<T>() 104 { 105 arrtype_ = 2; // Type = Vector 106 SetBA(a); 93 107 } 94 108
Note:
See TracChangeset
for help on using the changeset viewer.