40 inline bool setdata(
double a,
char type=
'R',
size_t n=0){
42 if(type ==
'N' || type ==
'n') this->
data[
n].noiserms =
a;
43 else if(type ==
'I' || type ==
'i') this->
data[
n].index =
int(a+0.1);
44 else if(type ==
'W' || type ==
'w') this->
data[
n].wave =
a;
45 else if(type ==
'U' || type ==
'u') this->
data[
n].w_90 =
a;
46 else if(type ==
'S' || type ==
's') this->
data[
n].asnr =
a;
47 else if(type ==
'P' || type ==
'p') this->
data[
n].a_90 =
a;
48 else if(type ==
'R' || type ==
'r') this->
data[
n].rank =
a;
49 else this->
data[
n].asnr =
a;
52 else {
return false; }
56 inline double getdata(
char type=
'R',
size_t n=0){
58 if(type ==
'N' || type ==
'n')
return double(this->
data[
n].noiserms);
59 else if(type ==
'I' || type ==
'i')
return double(this->
data[
n].
index);
60 else if(type ==
'W' || type ==
'w')
return double(this->
data[
n].
wave);
61 else if(type ==
'U' || type ==
'u')
return double(this->
data[
n].w_90);
62 else if(type ==
'S' || type ==
's')
return double(this->
data[
n].
asnr);
63 else if(type ==
'P' || type ==
'p')
return double(this->
data[
n].a_90);
64 else if(type ==
'R' || type ==
'r')
return double(this->
data[
n].
rank);
65 else return double(this->
data[
n].asnr);
71 inline size_t size(){
return this->
data.size(); }
76 data.clear(); std::vector<pixdata>().swap(
data);
77 tdAmp.clear(); std::vector<wavearray<float> >().swap(
tdAmp);
82 tdAmp.clear(); std::vector<wavearray<float> >().swap(
tdAmp);
87 bool write(
const FILE *);
89 bool read(
const FILE *);
105 std::vector<wavearray<float> >
tdAmp;
111 #endif // NETPIXEL_HH
std::vector< wavearray< float > > tdAmp
wavearray< double > a(hp.size())
std::vector< int > neighbors
std::vector< pixdata > data
bool operator==(const netpixel &) const
bool operator<(const netpixel &) const
double getdata(char type='R', size_t n=0)
bool setdata(double a, char type='R', size_t n=0)
netpixel & operator=(const netpixel &)