MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
hpimodelparameters.cpp
Go to the documentation of this file.
1//=============================================================================================================
35//=============================================================================================================
36// INCLUDES
37//=============================================================================================================
38
39#include "hpimodelparameters.h"
40
41//=============================================================================================================
42// QT INCLUDES
43//=============================================================================================================
44#include <QVector>
45
46//=============================================================================================================
47// EIGEN INCLUDES
48//=============================================================================================================
49
50//=============================================================================================================
51// USED NAMESPACES
52//=============================================================================================================
53
54using namespace INVERSELIB;
55
56//=============================================================================================================
57// DEFINE GLOBAL METHODS
58//=============================================================================================================
59
60//=============================================================================================================
61// DEFINE MEMBER METHODS
62//=============================================================================================================
63
64HpiModelParameters::HpiModelParameters(const QVector<int> vecHpiFreqs,
65 const int iSampleFreq,
66 const int iLineFreq,
67 const bool bBasic)
68 : m_vecHpiFreqs(vecHpiFreqs),
69 m_iSampleFreq(iSampleFreq),
70 m_iLineFreq(iLineFreq),
71 m_bBasic(bBasic)
72{
73 computeNumberOfCoils();
74 checkForLineFreq();
75}
76
77//=============================================================================================================
78
80 : m_vecHpiFreqs(hpiModelParameter.vecHpiFreqs()),
81 m_iNHpiCoils(hpiModelParameter.iNHpiCoils()),
82 m_iSampleFreq(hpiModelParameter.iSampleFreq()),
83 m_iLineFreq(hpiModelParameter.iLineFreq()),
84 m_bBasic(hpiModelParameter.bBasic())
85{
86}
87
88//=============================================================================================================
89
90void HpiModelParameters::computeNumberOfCoils()
91{
92 m_iNHpiCoils = m_vecHpiFreqs.size();
93}
94
95void HpiModelParameters::checkForLineFreq()
96{
97 if(m_iLineFreq == 0) {
98 m_bBasic = true;
99 }
100}
101
102//=============================================================================================================
103
104HpiModelParameters HpiModelParameters::operator= (const HpiModelParameters& other)
105{
106 if (this != &other) {
107 m_vecHpiFreqs = other.vecHpiFreqs();
108 m_iNHpiCoils = other.iNHpiCoils();
109 m_iSampleFreq = other.iSampleFreq();
110 m_iLineFreq = other.iLineFreq();
111 m_bBasic = other.bBasic();
112 }
113 return *this;
114}
HpiModelParameters class declaration.
Brief description of this class.
QVector< int > vecHpiFreqs() const