12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef SRC_READ_SPECTRA_READ_SPECTRA_H_
- #define SRC_READ_SPECTRA_READ_SPECTRA_H_
- #include <vector>
- #include <string>
- #include <complex>
- #include <utility>
- namespace read_spectra {
- class ReadSpectra {
- public:
- ReadSpectra &ReadFromFile(std::string filename);
- ReadSpectra &ResizeToComplex(double from_wl, double to_wl, int samples);
- ReadSpectra &ToIndex();
- std::complex<double> at(double wavelength);
- void PrintData();
- std::vector< std::pair< double, std::complex<double> > >&
- GetIndex(){return data_complex_index_;};
- private:
- std::vector< std::vector<double> > data_;
- std::vector< std::pair< double, std::complex<double> > > data_complex_;
- std::vector< std::pair< double, std::complex<double> > > data_complex_index_;
- void PermittivityToIndex();
- };
- }
- #endif
|