51 bool operator == (
const netpixel &)
const {
return true;}
52 bool operator < (
const netpixel &)
const {
return true;}
58 inline bool setdata(
double a,
char type=
'R',
size_t n=0){
60 if(type ==
'N' || type ==
'n') this->data[
n].noiserms =
a;
61 else if(type ==
'I' || type ==
'i') this->data[
n].index =
int(a+0.1);
62 else if(type ==
'W' || type ==
'w') this->data[
n].wave =
a;
63 else if(type ==
'U' || type ==
'u') this->data[
n].w_90 =
a;
64 else if(type ==
'S' || type ==
's') this->data[
n].asnr =
a;
65 else if(type ==
'P' || type ==
'p') this->data[
n].a_90 =
a;
66 else if(type ==
'R' || type ==
'r') this->data[
n].
rank =
a;
67 else this->data[
n].asnr =
a;
70 else {
return false; }
74 inline double getdata(
char type=
'R',
size_t n=0){
76 if(type ==
'N' || type ==
'n')
return double(this->data[
n].
noiserms);
77 else if(type ==
'I' || type ==
'i')
return double(this->data[
n].
index);
78 else if(type ==
'W' || type ==
'w')
return double(this->data[
n].
wave);
79 else if(type ==
'U' || type ==
'u')
return double(this->data[
n].
w_90);
80 else if(type ==
'S' || type ==
's')
return double(this->data[
n].
asnr);
81 else if(type ==
'P' || type ==
'p')
return double(this->data[
n].
a_90);
82 else if(type ==
'R' || type ==
'r')
return double(this->data[
n].
rank);
83 else return double(this->data[
n].asnr);
89 inline size_t size(){
return this->data.size(); }
91 inline size_t capacity(){
return data.capacity(); }
94 data.clear(); std::vector<pixdata>().swap(data);
95 tdAmp.clear(); std::vector<wavearray<float> >().swap(tdAmp);
96 neighbors.clear(); std::vector<int>().swap(neighbors);
100 tdAmp.clear(); std::vector<wavearray<float> >().swap(tdAmp);
103 inline void append(
int n){ neighbors.push_back(n); }
105 bool write(
const FILE *);
107 bool read(
const FILE *);
123 std::vector<wavearray<float> >
tdAmp;
129 #endif // NETPIXEL_HH
std::vector< wavearray< float > > tdAmp
wavearray< double > a(hp.size())
std::vector< int > neighbors
std::vector< pixdata > data
DataType_t rank(double=0.5) const
double getdata(char type='R', size_t n=0)
bool setdata(double a, char type='R', size_t n=0)