Package whistleClassifier
Class BasicFragmentStore
java.lang.Object
whistleClassifier.BasicFragmentStore
- All Implemented Interfaces:
FragmentStore
- Direct Known Subclasses:
HistoFragmentStore
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFragemnt
(WhistleFragment newFragment) Add a whistle fragment to the storevoid
Clear the store of existing data.getFitHistogram
(int fit) Get one of the histograms for mean, STD and Skewdouble
double[]
double[]
Get the parameters (9 of them) describing the fragments in this store.float
void
Prepare the store to receive new data.void
scaleStoreData
(double scaleFactor) Remove a fraction of the fragments from the storevoid
setSampleRate
(float sampleRate)
-
Constructor Details
-
BasicFragmentStore
public BasicFragmentStore(float sampleRate)
-
-
Method Details
-
getLatestParams
public double[] getLatestParams() -
getFragmentIterator
-
addFragemnt
Description copied from interface:FragmentStore
Add a whistle fragment to the store- Specified by:
addFragemnt
in interfaceFragmentStore
- Parameters:
newFragment
- fragment
-
clearStore
public void clearStore()Description copied from interface:FragmentStore
Clear the store of existing data.- Specified by:
clearStore
in interfaceFragmentStore
-
getFitHistogram
Description copied from interface:FragmentStore
Get one of the histograms for mean, STD and Skew- Specified by:
getFitHistogram
in interfaceFragmentStore
- Parameters:
fit
- histogram number (0, 1 or 2)- Returns:
- histogram object.
-
getFragmentCount
public double getFragmentCount()- Specified by:
getFragmentCount
in interfaceFragmentStore
-
getNegInflectionsHistogram
- Specified by:
getNegInflectionsHistogram
in interfaceFragmentStore
- Returns:
- the negative inflections histogram
-
getParameterArray
public double[] getParameterArray()Description copied from interface:FragmentStore
Get the parameters (9 of them) describing the fragments in this store.- Specified by:
getParameterArray
in interfaceFragmentStore
- Returns:
-
getPosInflectionsHistogram
- Specified by:
getPosInflectionsHistogram
in interfaceFragmentStore
- Returns:
- the positive inflections histogram.
-
prepareStore
public void prepareStore()Description copied from interface:FragmentStore
Prepare the store to receive new data.- Specified by:
prepareStore
in interfaceFragmentStore
-
scaleStoreData
public void scaleStoreData(double scaleFactor) Description copied from interface:FragmentStore
Remove a fraction of the fragments from the store- Specified by:
scaleStoreData
in 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
-