MNE-CPP  beta 1.0
dipole.h
Go to the documentation of this file.
1 //=============================================================================================================
21 #ifndef DIPOLE_H
22 #define DIPOLE_H
23 
24 //*************************************************************************************************************
25 //=============================================================================================================
26 // INCLUDES
27 //=============================================================================================================
28 
29 
30 //*************************************************************************************************************
31 //=============================================================================================================
32 // EIGEN INCLUDES
33 //=============================================================================================================
34 
35 #include <Eigen/Core>
36 
37 
38 //*************************************************************************************************************
39 //=============================================================================================================
40 // STL INCLUDES
41 //=============================================================================================================
42 
43 #include <iostream>
44 
45 
46 //*************************************************************************************************************
47 //=============================================================================================================
48 // DEFINE NAMESPACE INVERSELIB
49 //=============================================================================================================
50 
51 namespace INVERSELIB
52 {
53 
54 
55 //*************************************************************************************************************
56 //=============================================================================================================
57 // USED NAMESPACES
58 //=============================================================================================================
59 
60 using namespace Eigen;
61 
62 
63 //*************************************************************************************************************
64 //=============================================================================================================
65 // FORWARD DECLARATIONS
66 //=============================================================================================================
67 template<typename T>
68 class Dipole;
69 
70 
71 //=============================================================================================================
76 template<typename T>
77 struct DipolePair
78 {
79  int m_iIdx1;
82  int m_iIdx2;
86 };
87 
88 
89 
90 
91 //=============================================================================================================
97 template<class T>
98 class Dipole
99 {
100 //typedef Eigen::Matrix<T, 3, 1> Point3D;
101 
102 public:
103 
104  //=========================================================================================================
108  Dipole();
109 
110  //=========================================================================================================
116  /* Dipole();*/
117 
118 
119  //=========================================================================================================
124  virtual ~Dipole();
125 
126 
127  inline T& x() { return m_vecPosition[0] ; }
128  inline T& y() { return m_vecPosition[1] ; }
129  inline T& z() { return m_vecPosition[2] ; }
130  inline T x() const { return m_vecPosition[0] ; }
131  inline T y() const { return m_vecPosition[1] ; }
132  inline T z() const { return m_vecPosition[2] ; }
133 
134  inline T& phi_x() { return m_vecDirection[0] ; }
135  inline T& phi_y() { return m_vecDirection[1] ; }
136  inline T& phi_z() { return m_vecDirection[2] ; }
137  inline T phi_x() const { return m_vecDirection[0] ; }
138  inline T phi_y() const { return m_vecDirection[1] ; }
139  inline T phi_z() const { return m_vecDirection[2] ; }
140 
141 
142  //=========================================================================================================
146  void clean();
147 
148 protected:
149 
150 private:
151 
152  Eigen::Matrix<T, 3, 1> m_vecPosition;
153  Eigen::Matrix<T, 3, 1> m_vecDirection;
154 
155  double m_dLength;
156  double m_dFrequency;
157 
158  //TGreensFunction* green;
159 
160 };
161 
162 } // NAMESPACE
163 
164 //TypeDefs
168 
169 //Make the template definition visible to compiler in the first point of instantiation
170 #include "dipole.cpp"
171 
172 #endif // DIPOLE_H
Dipole< T > m_Dipole2
Definition: dipole.h:83
ToDo Documentation...
Dipole< T > m_Dipole1
Definition: dipole.h:80