MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
ecd.cpp
Go to the documentation of this file.
1//=============================================================================================================
37//=============================================================================================================
38// INCLUDES
39//=============================================================================================================
40
41#include "ecd.h"
42
43//=============================================================================================================
44// USED NAMESPACES
45//=============================================================================================================
46
47using namespace Eigen;
48using namespace INVERSELIB;
49
50//=============================================================================================================
51// DEFINE MEMBER METHODS
52//=============================================================================================================
53
55: valid(false)
56, time(-1)
57, rd(Vector3f::Zero(3))
58, Q(Vector3f::Zero(3))
59, good(0)
60, khi2(0)
61, nfree(0)
62, neval(-1)
63{
64}
65
66//=============================================================================================================
67
68ECD::ECD(const ECD& p_ECD)
69: valid(p_ECD.valid)
70, time(p_ECD.time)
71, rd(p_ECD.rd)
72, Q(p_ECD.Q)
73, good(p_ECD.good)
74, khi2(p_ECD.khi2)
75, nfree(p_ECD.nfree)
76, neval(p_ECD.neval)
77{
78}
79
80//=============================================================================================================
81
83{
84}
85
86//=============================================================================================================
87
88void ECD::print(FILE *f) const
89{
90 if (!f || !this->valid)
91 return;
92
93 fprintf(f,"%6.1f %7.2f %7.2f %7.2f %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f %d\n",
94 1000*this->time, /* Time */
95 1000*this->rd[0], /* Dipole location */
96 1000*this->rd[1],
97 1000*this->rd[2],
98 1e9*this->Q.norm(), /* Dipole moment */
99 1e9*this->Q[0],1e9*this->Q[1],1e9*this->Q[2],
100 this->khi2/this->nfree, /* This is the reduced khi^2 value */
101 100*this->good, /* Goodness of fit */
102 this->neval); /* Number of function evaluations required */
103}
Electric Current Dipole (ECD) class declaration.
Electric Current Dipole description.
Definition ecd.h:73
Eigen::Vector3f rd
Definition ecd.h:109
float time
Definition ecd.h:108
bool valid
Definition ecd.h:107
void print(FILE *f) const
Definition ecd.cpp:88
Eigen::Vector3f Q
Definition ecd.h:110