Brief description of class still missing. More...
#include <MaxEntryList.h>
Public Types | |
enum | Type { Undefined, FK, SPAC, TFA, CURVE } |
Public Member Functions | |
int | count (double x) const |
int | count () const |
void | fillGrid (IrregularGrid2D &grid) |
IrregularGrid2D | initGrid (int nValues, double minValue, double maxValue, SamplingOption ySampling) |
void | keepComponent (int componentIndex) |
void | keepRing (int ringIndex) |
bool | load (QString fileName) |
MaxEntryList () | |
RealStatisticalValue | meanValue (double x, SamplingOption ySampling) const |
void | rejectAmplitudeHorizontalAbsolute (double ampH) |
void | rejectAmplitudeVerticalAbsolute (double ampZ) |
void | rejectAmplitudeVerticalFactor (double factor) |
void | rejectDelay (double delay) |
void | rejectHigherDelays (double maxDelay) |
void | rejectLowerDelays (double minDelay) |
void | rejectNPeaksPerFrequency (int npf) |
void | rejectNPeaksPerMinute (double nppm) |
void | rejectPower (double relativeFactor, double absoluteFactor) |
void | rejectTime (double min, double max) |
void | rejectValue (double minValue, double maxValue) |
bool | save (QString fileName) |
void | selectAll (double x) |
void | selectAll () |
void | setType (Type t) |
void | toStream (QTextStream &s) |
Type | type () const |
void | unselectAmplitude (double factor) |
void | unselectPower (double relativeFactor, double absoluteFactor) |
void | unselectValue (double x, double minSlowness, double maxSlowness) |
void | unselectWavenumber (double minWavenumber, double maxWavenumber) |
~MaxEntryList () |
Brief description of class still missing.
Full description of class still missing
MaxEntryList::MaxEntryList | ( | ) | [inline] |
int MaxEntryList::count | ( | double | x | ) | const |
Returns the number of samples at frequency.
References MaxEntry::isSelected(), TRACE, and MaxEntry::x().
Referenced by main().
{ TRACE; int i= 0; QList<MaxEntry *>::const_iterator it; for(it=begin();it!=end();++it) { MaxEntry& entry=**it; if(entry.x()==x && entry.isSelected()) { i++; } } return i; }
int MaxEntryList::count | ( | ) | const [inline] |
Referenced by keepComponent(), keepRing(), load(), rejectAmplitudeHorizontalAbsolute(), rejectAmplitudeVerticalAbsolute(), rejectAmplitudeVerticalFactor(), rejectDelay(), rejectNPeaksPerFrequency(), rejectNPeaksPerMinute(), rejectPower(), rejectTime(), rejectValue(), and toStream().
{return QList<MaxEntry *>::count();}
void MaxEntryList::fillGrid | ( | IrregularGrid2D & | grid | ) |
References QGpCoreTools::IrregularGrid2D::indexOfX(), QGpCoreTools::IrregularGrid2D::indexOfY(), QGpCoreTools::IrregularGrid2D::init(), MaxEntry::isSelected(), QGpCoreTools::IrregularGrid2D::nx(), TRACE, MaxEntry::value(), QGpCoreTools::IrregularGrid2D::valuePointer(), and MaxEntry::x().
Referenced by HistogramWidget::fillGrid().
{ TRACE; grid.init(0.0); int ix; double x=-1.0; double * val=0; int nx=grid.nx(); QList<MaxEntry *>::iterator it; for(it=begin();it!=end();++it) { MaxEntry& entry=**it; if(x!=entry.x()) { x=entry.x(); ix=grid.indexOfX(x); val=grid.valuePointer(ix, 0); } if(entry.isSelected()) { int iy=grid.indexOfY(entry.value()); val[ iy * nx ] ++; } } }
IrregularGrid2D MaxEntryList::initGrid | ( | int | nValues, |
double | minValue, | ||
double | maxValue, | ||
SamplingOption | ySampling | ||
) |
References QGpCoreTools::LogScale, MSG_ID, rejectValue(), QGpCoreTools::IrregularGrid2D::setLinear(), QGpCoreTools::IrregularGrid2D::setLog(), QGpCoreTools::IrregularGrid2D::setX(), QGpCoreTools::tr(), TRACE, and QGpCoreTools::YAxis.
Referenced by HistogramWidget::initGrid().
{ TRACE; rejectValue(minValue, maxValue); QList<double> xList=xSamples(); int nBands=xList.count(); if(nBands==0) { Message::critical(MSG_ID, tr("Grid initialization"), tr("Null number of frequency samples: check you filter parameters.")); xList << 1.0; // Add a fake frequency nBands=1; } IrregularGrid2D grid(nBands, nValues); for(int i=0;i<nBands;i++) grid.setX(i, xList.at(i)); if(ySampling & LogScale) { grid.setLog(YAxis, minValue, maxValue); } else { grid.setLinear(YAxis, minValue, maxValue); } return grid; }
void MaxEntryList::keepComponent | ( | int | componentIndex | ) |
References QGpCoreTools::ConsoleProgress::begin(), SPACMaxEntry::component(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), SPAC, and TRACE.
Referenced by HistogramWidget::select().
{ TRACE; ASSERT(_type==SPAC); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(component)... "); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { const SPACMaxEntry& m=*static_cast<const SPACMaxEntry *>(at(i)); if(m.component()!=componentIndex) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::keepRing | ( | int | ringIndex | ) |
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), SPACMaxEntry::ring(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), SPAC, and TRACE.
Referenced by HistogramWidget::select().
{ TRACE; ASSERT(_type==SPAC); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(ring)... "); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { const SPACMaxEntry& m=*static_cast<const SPACMaxEntry *>(at(i)); if(m.ring()!=ringIndex) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
bool MaxEntryList::load | ( | QString | fileName | ) |
Can be called only once.
References QGpCoreTools::ConsoleProgress::begin(), count(), CURVE, QGpCoreTools::ConsoleProgress::end(), FK, TFAMaxEntry::isHeaderLine(), CurveMaxEntry::isHeaderLine(), SPACMaxEntry::isHeaderLine(), FKMaxEntry::isHeaderLine(), MSG_ID, MaxEntry::readLine(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setValue(), SPAC, TFA, QGpCoreTools::tr(), TRACE, and Undefined.
Referenced by main().
{ TRACE; QFile f(fileName); if( !f.open(QIODevice::ReadOnly) ) { Message::warning(MSG_ID, tr("Loading max file"), tr("Impossible to access to file %1").arg(fileName), Message::cancel()); return false; } QTextStream s(&f); // get type of max file if(_type==Undefined) { QString line; while(true) { line=s.readLine(); if(line.isEmpty()) break; if(line[0]=='#') { line=line.toLower().replace(" ", ""); if(FKMaxEntry::isHeaderLine(line)) { _type=FK; break; } else if(SPACMaxEntry::isHeaderLine(line)) { _type=SPAC; break; } else if(TFAMaxEntry::isHeaderLine(line)) { _type=TFA; break; } else if(CurveMaxEntry::isHeaderLine(line)) { _type=CURVE; break; } } } } // load entries MaxEntry * entry; ConsoleProgress progress; progress.setCaption("Loading... "); progress.begin(); while(true) { switch (_type) { case FK: entry=new FKMaxEntry; break; case SPAC: entry=new SPACMaxEntry; break; case TFA: entry=new TFAMaxEntry; break; case CURVE: entry=new CurveMaxEntry; break; default: Message::warning(MSG_ID, "Loading max file", "Impossible to determine file type (FK, SPAC, TFA or CURVE). This type is automatically recognized from the " "comment line containing the field names. You can force the type by using the command line options. See " "-help for more information.", Message::cancel()); return false; } if(entry->readLine(s)) { append(entry); } else { delete entry; break; } progress.setValue(count()); } progress.end(count()); fprintf(stderr,"Sorting... \n"); qSort(begin(), end(), lessThan); return true; }
RealStatisticalValue MaxEntryList::meanValue | ( | double | x, |
SamplingOption | ySampling | ||
) | const |
Return the mean value of the samples at x.
References QGpCoreTools::ProcessStatistics::add(), QGpCoreTools::ProcessStatistics::addLog(), MaxEntry::isSelected(), QGpCoreTools::LogScale, TRACE, QGpCoreTools::ProcessStatistics::value(), MaxEntry::value(), QGpCoreTools::ProcessStatistics::valueLog(), and MaxEntry::x().
{ TRACE; ProcessStatistics p; QList<MaxEntry *>::const_iterator it; if(ySampling & LogScale) { for(it=begin();it!=end();++it) { MaxEntry& entry=**it; if(entry.x()==x && entry.isSelected()) { p.addLog(entry.value()); } } return p.valueLog(); } else { for(it=begin();it!=end();++it) { MaxEntry& entry=**it; if(entry.x()==x && entry.isSelected()) { p.add(entry.value()); } } return p.value(); } }
void MaxEntryList::rejectAmplitudeHorizontalAbsolute | ( | double | ampH | ) |
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), TFAMaxEntry::hAmplitude(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), TFA, and TRACE.
Referenced by filter().
{ TRACE; ASSERT(_type==TFA); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(tfaAmpH)... "); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { const TFAMaxEntry& m=*static_cast<const TFAMaxEntry *>(at(i)); if(m.hAmplitude() < ampH) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectAmplitudeVerticalAbsolute | ( | double | ampZ | ) |
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), TFA, TRACE, and TFAMaxEntry::vAmplitude().
Referenced by filter().
{ TRACE; ASSERT(_type==TFA); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(tfaAmpZ)... "); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { const TFAMaxEntry& m=*static_cast<const TFAMaxEntry *>(at(i)); if(m.vAmplitude() < ampZ) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectAmplitudeVerticalFactor | ( | double | factor | ) |
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), TFA, TRACE, TFAMaxEntry::vAmplitude(), and MaxEntry::x().
Referenced by filter().
{ TRACE; ASSERT(_type==TFA); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(tfaAmpZFactor)... "); progress.setMaximum(count()-1); progress.begin(); QMap<double,double> minVAmplitude; minAmplitudeVectors(minVAmplitude, factor); int nEntries=count(); for(int i=0;i<nEntries;i++) { const TFAMaxEntry& m=*static_cast<const TFAMaxEntry *>(at(i)); double x=m.x(); if(m.vAmplitude() < minVAmplitude[x]) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectDelay | ( | double | delay | ) |
References QGpCoreTools::ConsoleProgress::begin(), count(), TFAMaxEntry::delay(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), TFA, and TRACE.
Referenced by filter().
{ TRACE; ASSERT(_type==TFA); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(tfaNppm)... "); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { const TFAMaxEntry& m=*static_cast<const TFAMaxEntry *>(at(i)); if(m.delay()!=delay) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectHigherDelays | ( | double | maxDelay | ) |
void MaxEntryList::rejectLowerDelays | ( | double | minDelay | ) |
void MaxEntryList::rejectNPeaksPerFrequency | ( | int | npf | ) |
Assumes that all entries are sorted by frequency, vAmplitude
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), TFA, and TRACE.
Referenced by filter().
{ TRACE; ASSERT(_type==TFA); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(tfaNppf)... "); progress.setMaximum(count()-1); progress.begin(); int n=0; double currentX=first()->x(); int nEntries=count(); for(int i=0;i<nEntries;i++) { if(at(i)->x()!=currentX) { n=0; currentX=at(i)->x(); } if(n>=npf) { delete at(i); } else { newEntryList.append(at(i)); n++; } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectNPeaksPerMinute | ( | double | nppm | ) |
Assumes that all entries are sorted by frequency, vAmplitude. If nppm is less than 1, the time length is increased until reaching 1
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), TFA, and TRACE.
Referenced by filter(), and HistogramWidget::select().
{ TRACE; ASSERT(_type==TFA); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(tfaNppm)... "); progress.setMaximum(count()-1); progress.begin(); double currentX=first()->x(); int nEntries=count(); QMap<double, int> times; double timeSegment; if(nppm < 1.0) { timeSegment=60.0/nppm; nppm=1.0; } else { timeSegment=60.0; } for(int i=0;i<nEntries;i++) { if(at(i)->x()!=currentX) { currentX=at(i)->x(); times.clear(); } // Look back timeSegment seconds before and after this peak and count available peaks progress.setValue(i); double t=at(i)->time(); double currentNppmB=0.0, currentNppmF=0.0; QMap<double, int>::iterator itForward=times.lowerBound(t); QMap<double, int>::iterator itBack=itForward-1; QList<double> aroundTimes; while(itBack!=times.end() && itBack.key() > t-timeSegment) { aroundTimes.prepend(itBack.key()); itBack--; currentNppmB++; } if(currentNppmB>=nppm) { delete at(i); continue; } while(itForward!=times.end() && itForward.key() < t+timeSegment) { aroundTimes.append(itForward.key()); itForward++; currentNppmF++; } if(currentNppmF>=nppm) { delete at(i); continue; } // Scan all possible time segment to check if number of time is less than nppm int iAroundTimes, iNppm=(int) nppm - 1; for(iAroundTimes=aroundTimes.count() - iNppm -1; iAroundTimes>=0; iAroundTimes-- ) { if(aroundTimes.at(iAroundTimes+iNppm) - aroundTimes.at(iAroundTimes) < timeSegment) { break; } } if(iAroundTimes>=0) { delete at(i); continue; } // OK, new time is acceptable times.insert(at(i)->time(), i); newEntryList.append(at(i)); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectPower | ( | double | relativeFactor, |
double | absoluteFactor | ||
) |
References FKMaxEntry::absolutePower(), QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), FK, FKMaxEntry::relativePower(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), TRACE, and MaxEntry::x().
Referenced by HistogramWidget::select().
{ TRACE; ASSERT(_type==FK); QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption("Filtering(power)... "); progress.setMaximum(count()-1); progress.begin(); QMap<double,double> minRelPow, minAbsPow; minPowerVectors(minRelPow, minAbsPow, relativeFactor, absoluteFactor); int nEntries=count(); for(int i=0;i<nEntries;i++) { const FKMaxEntry& m=*static_cast<const FKMaxEntry *>(at(i)); double x=m.x(); if(m.relativePower() < minRelPow[x] && m.absolutePower() < minAbsPow[x] ) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectTime | ( | double | min, |
double | max | ||
) |
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), QGpCoreTools::tr(), and TRACE.
{ TRACE; QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption(tr("Filtering(time)... ")); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { double t=at(i)->time(); if(t<min || t>max) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
void MaxEntryList::rejectValue | ( | double | minValue, |
double | maxValue | ||
) |
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), QGpCoreTools::tr(), and TRACE.
Referenced by initGrid().
{ TRACE; QList<MaxEntry *> newEntryList; ConsoleProgress progress; progress.setCaption(tr("Filtering(value)... ")); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { double s=at(i)->value(); if(s<minValue || s>maxValue) { delete at(i); } else { newEntryList.append(at(i)); } progress.setValue(i); } progress.end(); clear(); *static_cast< QList<MaxEntry *>* >(this)=newEntryList; }
bool MaxEntryList::save | ( | QString | fileName | ) |
References MSG_ID, toStream(), QGpCoreTools::tr(), and TRACE.
{ TRACE; if(isEmpty()) { Message::warning(MSG_ID, tr("Saving max file"), tr("Null number of entries, nothing written"), Message::cancel()); return false; } QFile f(fileName); if(!f.open(QIODevice::WriteOnly)) { Message::warning(MSG_ID, tr("Saving max file"), tr("Impossible to access to file %1").arg(fileName), Message::cancel()); return false; } QTextStream s(&f); toStream(s); return true; }
void MaxEntryList::selectAll | ( | double | x | ) |
References MaxEntry::setSelected(), TRACE, and MaxEntry::x().
{ TRACE; QList<MaxEntry *>::iterator it; for(it=begin();it!=end();++it) { MaxEntry& entry=**it; if(entry.x()==x) entry.setSelected(true); } }
void MaxEntryList::selectAll | ( | ) |
void MaxEntryList::setType | ( | Type | t | ) | [inline] |
Referenced by main().
{_type=t;}
void MaxEntryList::toStream | ( | QTextStream & | s | ) |
References QGpCoreTools::ConsoleProgress::begin(), count(), QGpCoreTools::ConsoleProgress::end(), QGpCoreTools::ConsoleProgress::setCaption(), QGpCoreTools::AbstractProgress::setMaximum(), QGpCoreTools::AbstractProgress::setValue(), QGpCoreTools::tr(), and TRACE.
Referenced by main(), and save().
{ TRACE; first()->writeHeader(s); ConsoleProgress progress; progress.setCaption(tr("Saving... ")); progress.setMaximum(count()-1); progress.begin(); int nEntries=count(); for(int i=0;i<nEntries;i++) { at(i)->writeLine(s); progress.setValue(i); } progress.end(); }
Type MaxEntryList::type | ( | ) | const [inline] |
Referenced by filter(), HistogramWidget::HistogramWidget(), HistogramWidget::select(), and HistogramWidget::toStream().
{return _type;}
void MaxEntryList::unselectAmplitude | ( | double | factor | ) |
References MaxEntry::setSelected(), TFA, TRACE, TFAMaxEntry::vAmplitude(), and MaxEntry::x().
{ TRACE; ASSERT(_type==TFA); QMap<double,double> minVAmplitude; minAmplitudeVectors(minVAmplitude, factor); QList<MaxEntry *>::iterator it; for(it=begin();it!=end();++it) { TFAMaxEntry& entry=*static_cast<TFAMaxEntry *>(*it); double x=entry.x(); if(entry.vAmplitude() < minVAmplitude[x]) { entry.setSelected(false); } } }
void MaxEntryList::unselectPower | ( | double | relativeFactor, |
double | absoluteFactor | ||
) |
References FKMaxEntry::absolutePower(), FK, FKMaxEntry::relativePower(), MaxEntry::setSelected(), TRACE, and MaxEntry::x().
{ TRACE; ASSERT(_type==FK); QMap<double,double> minRelPow, minAbsPow; minPowerVectors(minRelPow, minAbsPow, relativeFactor, absoluteFactor); QList<MaxEntry *>::iterator it; for(it=begin();it!=end();++it) { FKMaxEntry& entry=*static_cast<FKMaxEntry *>(*it); double x=entry.x(); if(entry.relativePower() < minRelPow[x] && entry.absolutePower() < minAbsPow[x] ) { entry.setSelected(false); } } }
void MaxEntryList::unselectValue | ( | double | x, |
double | minSlowness, | ||
double | maxSlowness | ||
) |
References MaxEntry::setSelected(), TRACE, MaxEntry::value(), and MaxEntry::x().
{ TRACE; QList<MaxEntry *>::iterator it; for(it=begin();it!=end();++it) { MaxEntry& entry=**it; double s=entry.value(); if(entry.x()==x && (s<minValue || s>maxValue)) { entry.setSelected(false); } } }
void MaxEntryList::unselectWavenumber | ( | double | minWavenumber, |
double | maxWavenumber | ||
) |
Specific to FK type
References FK, MaxEntry::setSelected(), TRACE, and FKMaxEntry::wavenumber().
{ TRACE; ASSERT(_type==FK); QList<MaxEntry *>::iterator it; for(it=begin();it!=end();++it) { FKMaxEntry& entry=*static_cast<FKMaxEntry *>(*it); double k=entry.wavenumber(); if(k<minWavenumber || k>maxWavenumber) { entry.setSelected(false); } } }