Package whistleClassifier
Class BasicFragmentStore
java.lang.Object
whistleClassifier.BasicFragmentStore
- All Implemented Interfaces:
FragmentStore
- Direct Known Subclasses:
HistoFragmentStore
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFragemnt(WhistleFragment newFragment, long time) Add a whistle fragment to the storevoidClear the store of existing data.longgetFitHistogram(int fit) Get one of the histograms for mean, STD and Skewdoubledoubledouble[]doubledouble[]Get the parameters (9 of them) describing the fragments in this store.floatlongvoidPrepare the store to receive new data.voidscaleStoreData(double scaleFactor) Remove a fraction of the fragments from the storevoidsetSampleRate(float sampleRate)
-
Field Details
-
parameteriser
-
-
Constructor Details
-
BasicFragmentStore
public BasicFragmentStore(float sampleRate)
-
-
Method Details
-
getLatestParams
public double[] getLatestParams() -
getFragmentIterator
-
addFragemnt
Description copied from interface:FragmentStoreAdd a whistle fragment to the store- Specified by:
addFragemntin interfaceFragmentStore- Parameters:
newFragment- fragmenttime- fragment time in milliseconds
-
clearStore
public void clearStore()Description copied from interface:FragmentStoreClear the store of existing data.- Specified by:
clearStorein interfaceFragmentStore
-
getFitHistogram
Description copied from interface:FragmentStoreGet one of the histograms for mean, STD and Skew- Specified by:
getFitHistogramin interfaceFragmentStore- Parameters:
fit- histogram number (0, 1 or 2)- Returns:
- histogram object.
-
getFragmentCount
public double getFragmentCount()- Specified by:
getFragmentCountin interfaceFragmentStore
-
getNegInflectionsHistogram
- Specified by:
getNegInflectionsHistogramin interfaceFragmentStore- Returns:
- the negative inflections histogram
-
getParameterArray
public double[] getParameterArray()Description copied from interface:FragmentStoreGet the parameters (9 of them) describing the fragments in this store.- Specified by:
getParameterArrayin interfaceFragmentStore- Returns:
-
getPosInflectionsHistogram
- Specified by:
getPosInflectionsHistogramin interfaceFragmentStore- Returns:
- the positive inflections histogram.
-
prepareStore
public void prepareStore()Description copied from interface:FragmentStorePrepare the store to receive new data.- Specified by:
prepareStorein interfaceFragmentStore
-
scaleStoreData
public void scaleStoreData(double scaleFactor) Description copied from interface:FragmentStoreRemove a fraction of the fragments from the store- Specified by:
scaleStoreDatain interfaceFragmentStore- Parameters:
scaleFactor- fraction of fragments ot leave
-
setSampleRate
public void setSampleRate(float sampleRate) - Parameters:
sampleRate- the sampleRate to set
-
getSampleRate
public float getSampleRate()- Returns:
- the sampleRate
-
getStartTimeMillis
public long getStartTimeMillis()- Returns:
- the startTimeMillis
-
getEndTimeMillis
public long getEndTimeMillis()- Returns:
- the endTimeMillis
-
getLowFreq
public double getLowFreq()- Returns:
- the lowFreq
-
getHighFreq
public double getHighFreq()- Returns:
- the highFreq
-