-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ek.cpp
46 lines (39 loc) · 925 Bytes
/
Ek.cpp
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
40
41
42
43
44
45
46
#include "Ek_i.h"
Ek::Ek()
{
}
Ek::~Ek()
{
}
void Ek::clear(){
int pMaxN = size();
for (int i = -pMaxN; i<=pMaxN; i++)
for (int j = -pMaxN; j<=pMaxN; j++)
for (int k = -pMaxN; k<=pMaxN; k++)
{
(*this)[i][j][k]=dcomp(0,0);
}
}
int Ek::size(int pMaxN){
dcomp3D::resize(pMaxN);
for (int i = -pMaxN; i<=pMaxN; i++)
{
dcomp3D::operator[](i).resize(pMaxN);
for (int j = -pMaxN; j<=pMaxN; j++)
{
dcomp3D::operator[](i)[j].resize(pMaxN);
}
}
return pMaxN;
}
int Ek::size()
{
return dcomp3D::size();
}
void Ek::print(std::ostream *ost){
int eksize = dcomp3D::size();
for(int i=-eksize; i<=eksize; i++)
for(int j=-eksize; j<=eksize; j++)
for(int k=-eksize; k<=eksize; k++)
*ost << "Ek["<<i<<"]["<<j<<"]["<<k<<"]="<<flush<<(*this)[i][j][k]<<endl;
}