Changeset 364
- Timestamp:
- 02/03/05 18:59:17 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MathUtils.cc
r209 r364 76 76 } 77 77 } 78 -
trunk/src/MathUtils.h
r176 r364 37 37 namespace mathutil { 38 38 39 // Add new entry to list 39 40 template <class T> 41 casa::uInt addEntry (casa::Vector<T>& list, T val); 42 40 43 41 44 // Hanning smoothing 45 template <class T> 42 46 void hanning(casa::Vector<T>& out, casa::Vector<casa::Bool>& outmask, 43 47 const casa::Vector<T>& in, const casa::Vector<casa::Bool>& mask, -
trunk/src/MathUtils2.cc
r209 r364 89 89 } 90 90 } 91 92 template <class T> 93 uInt mathutil::addEntry (Vector<T>& list, T val) 94 { 95 uInt n = list.nelements(); 96 if (n>0) { 97 for (uInt i=0; i<n; i++) { 98 if (near(list[i],val)) { 99 return i; 100 } 101 } 102 } 103 // 104 n++; 105 list.resize(n,True); 106 list(n-1) = val; 107 return n-1; 108 } 109 110 111 112 113 114
Note:
See TracChangeset
for help on using the changeset viewer.