version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
mspass::algorithms::deconvolution::ThreeCSpike Class Reference

Public Member Functions

 ThreeCSpike (mspass::utility::dmatrix &d, int k)
 
 ThreeCSpike (const ThreeCSpike &parent)
 
ThreeCSpikeoperator= (const ThreeCSpike &parent)
 

Public Attributes

int col
 
double u [3]
 
double amp
 

Constructor & Destructor Documentation

◆ ThreeCSpike() [1/2]

mspass::algorithms::deconvolution::ThreeCSpike::ThreeCSpike ( mspass::utility::dmatrix d,
int  k 
)
8 {
9 try {
10 int i;
11 for (i = 0; i < 3; ++i)
12 u[i] = d(i, k);
13 col = k;
14 for (i = 0, amp = 0.0; i < 3; ++i)
15 amp += u[i] * u[i];
16 amp = sqrt(amp);
17 } catch (...) {
18 throw;
19 };
20}
double amp
Definition GeneralIterDecon.h:28
double u[3]
Definition GeneralIterDecon.h:26
int col
Definition GeneralIterDecon.h:24

◆ ThreeCSpike() [2/2]

mspass::algorithms::deconvolution::ThreeCSpike::ThreeCSpike ( const ThreeCSpike parent)

Copy consructor. Could be defaulted, I think, but best to create it explicitly.

21 {
22 col = parent.col;
23 amp = parent.amp;
24 for (int k = 0; k < 3; ++k)
25 u[k] = parent.u[k];
26}

References amp, col, and u.

Member Function Documentation

◆ operator=()

ThreeCSpike & mspass::algorithms::deconvolution::ThreeCSpike::operator= ( const ThreeCSpike parent)

Makign sure operator= is also essential be sure STL containers work correctly

27 {
28 if (this != (&parent)) {
29 col = parent.col;
30 amp = parent.amp;
31 for (int k = 0; k < 3; ++k)
32 u[k] = parent.u[k];
33 }
34 return *this;
35}

References amp, col, and u.

Member Data Documentation

◆ amp

double mspass::algorithms::deconvolution::ThreeCSpike::amp

L2 norm of u savd for efficiency to avoid repeated calculations

◆ col

int mspass::algorithms::deconvolution::ThreeCSpike::col

The column position where this spike should be placed in parent three component dmatrix where time is the column field

◆ u

double mspass::algorithms::deconvolution::ThreeCSpike::u[3]

This holds the amplitude of this spike as three components


The documentation for this class was generated from the following files: