Commit cea4066498fd0a4f98797da3313e90015383a574

Authored by David Mayerich
1 parent b31c02eb

fixed Linux errors

Showing 2 changed files with 6 additions and 6 deletions   Show diff stats
@@ -419,10 +419,10 @@ public: @@ -419,10 +419,10 @@ public:
419 file.read((char*)in, in_bytes); //read an input spectrum 419 file.read((char*)in, in_bytes); //read an input spectrum
420 for (size_t b = 0; b < Bout; b++) { //for each band 420 for (size_t b = 0; b < Bout; b++) { //for each band
421 wc = bandlist[b]; //set the desired wavelength 421 wc = bandlist[b]; //set the desired wavelength
422 - band_bounds(wc, b0, b1); //get the surrounding bands 422 + hsi<T>::band_bounds(wc, b0, b1); //get the surrounding bands
423 w0 = w[b0]; //get the wavelength for the lower band 423 w0 = w[b0]; //get the wavelength for the lower band
424 w1 = w[b1]; //get the wavelength for the higher band 424 w1 = w[b1]; //get the wavelength for the higher band
425 - out[b] = lerp(wc, in[b0], w0, in[b1], w1); //interpolate the spectral values to get the desired output value 425 + out[b] = hsi<T>::lerp(wc, in[b0], w0, in[b1], w1); //interpolate the spectral values to get the desired output value
426 } 426 }
427 } 427 }
428 else 428 else
@@ -63,8 +63,8 @@ protected: @@ -63,8 +63,8 @@ protected:
63 } 63 }
64 64
65 /// Gets the two band indices surrounding a given wavelength 65 /// Gets the two band indices surrounding a given wavelength
66 - void band_bounds(double wavelength, unsigned long long& low, unsigned long long& high){  
67 - unsigned long long B = Z(); 66 + void band_bounds(double wavelength, size_t& low, size_t& high){
  67 + size_t B = Z();
68 for(high = 0; high < B; high++){ 68 for(high = 0; high < B; high++){
69 if(w[high] > wavelength) break; 69 if(w[high] > wavelength) break;
70 } 70 }
@@ -92,7 +92,7 @@ protected: @@ -92,7 +92,7 @@ protected:
92 /// @param s is the spectrum in main memory of length Z() 92 /// @param s is the spectrum in main memory of length Z()
93 /// @param wavelength is the wavelength value to interpolate out 93 /// @param wavelength is the wavelength value to interpolate out
94 T interp_spectrum(T* s, double wavelength){ 94 T interp_spectrum(T* s, double wavelength){
95 - unsigned long long low, high; //indices for the bands surrounding wavelength 95 + size_t low, high; //indices for the bands surrounding wavelength
96 band_bounds(wavelength, low, high); //get the surrounding band indices 96 band_bounds(wavelength, low, high); //get the surrounding band indices
97 97
98 if(high == w.size()) return s[w.size()-1]; //if the high band is above the wavelength range, return the highest wavelength value 98 if(high == w.size()) return s[w.size()-1]; //if the high band is above the wavelength range, return the highest wavelength value
@@ -225,4 +225,4 @@ public: @@ -225,4 +225,4 @@ public:
225 225
226 } //end namespace STIM 226 } //end namespace STIM
227 227
228 -#endif  
229 \ No newline at end of file 228 \ No newline at end of file
  229 +#endif