-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCharacteristicMatrix.h
39 lines (28 loc) · 1.16 KB
/
CharacteristicMatrix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef JMG_CHARACTERISTIC_MATRIX_H
#define JMG_CHARACTERISTIC_MATRIX_H
#include <complex>
#include <vector>
#include "Matrix.h"
using std::complex;
const complex <double> air_index = complex <double> (1.0, 0.0);
class CharacteristicMatrix
{
public:
double thickness() const;
double wavelength() const;
Matrix GetMatrix() const;
CharacteristicMatrix & operator *= (const CharacteristicMatrix & rhs);
double ReflectivityInEnvironment(const complex <double> & index_before = air_index, const complex <double> & index_after = air_index) const;
double TransmissionInEnvironment(const complex <double> & index_before = air_index, const complex <double> & index_after = air_index) const;
private:
static double MagnitudeSquared(const complex <double> & number);
Matrix CalculateFullMatrixInEnvironment(const complex <double> & index_before, const complex <double> & index_after) const;
complex <double> Wavenumber(const complex <double> & index) const;
protected:
CharacteristicMatrix();
double _thickness;
double _wavelength;
Matrix _matrix;
};
CharacteristicMatrix operator * (const CharacteristicMatrix & lhs, const CharacteristicMatrix & rhs);
#endif