public class BasicFragmentStore extends java.lang.Object implements FragmentStore
Constructor and Description |
---|
BasicFragmentStore(float sampleRate) |
Modifier and Type | Method and Description |
---|---|
void |
addFragemnt(WhistleFragment newFragment)
Add a whistle fragment to the store
|
void |
clearStore()
Clear the store of existing data.
|
PamHistogram |
getFitHistogram(int fit)
Get one of the histograms for mean, STD and Skew
|
double |
getFragmentCount() |
java.util.Iterator<WhistleFragment> |
getFragmentIterator() |
double[] |
getLatestParams() |
PamHistogram |
getNegInflectionsHistogram() |
double[] |
getParameterArray()
Get the parameters (9 of them) describing the fragments in this store.
|
PamHistogram |
getPosInflectionsHistogram() |
float |
getSampleRate() |
void |
prepareStore()
Prepare the store to receive new data.
|
void |
scaleStoreData(double scaleFactor)
Remove a fraction of the fragments from the store
|
void |
setSampleRate(float sampleRate) |
public double[] getLatestParams()
public java.util.Iterator<WhistleFragment> getFragmentIterator()
public void addFragemnt(WhistleFragment newFragment)
FragmentStore
addFragemnt
in interface FragmentStore
newFragment
- fragmentpublic void clearStore()
FragmentStore
clearStore
in interface FragmentStore
public PamHistogram getFitHistogram(int fit)
FragmentStore
getFitHistogram
in interface FragmentStore
fit
- histogram number (0, 1 or 2)public double getFragmentCount()
getFragmentCount
in interface FragmentStore
public PamHistogram getNegInflectionsHistogram()
getNegInflectionsHistogram
in interface FragmentStore
public double[] getParameterArray()
FragmentStore
getParameterArray
in interface FragmentStore
public PamHistogram getPosInflectionsHistogram()
getPosInflectionsHistogram
in interface FragmentStore
public void prepareStore()
FragmentStore
prepareStore
in interface FragmentStore
public void scaleStoreData(double scaleFactor)
FragmentStore
scaleStoreData
in interface FragmentStore
scaleFactor
- fraction of fragments ot leavepublic void setSampleRate(float sampleRate)
sampleRate
- the sampleRate to setpublic float getSampleRate()