public abstract class SplitSetPlot extends java.lang.Object implements PeriodSequencePlot
PeriodSequencePlot
where the data is split over a series of time periods
The time periods are divided into Major/Minor sub-divisions called
Catagories and Items.Modifier and Type | Class and Description |
---|---|
class |
SplitSetPlot.PeriodIterator |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
lab |
Constructor and Description |
---|
SplitSetPlot() |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(int nset,
int cat,
int item,
float value) |
<D> void |
addData(SetRangeMapper<D> t,
D o)
add data from an object to the dataset using strategy transform
|
<F> boolean |
addMapData(QueryMapper<F> t,
F o)
Populate plot using a
QueryMapper and a factory
Each point of the graph is generated by a call to the QueryMapper |
void |
datasetScale(double scale,
PeriodSequencePlot nm)
rescale a dataset by constant divided by the value in a different dataset
The normalisation dataset is assumed to have a single Set.
|
abstract void |
doConvertToStacked()
convert to stacked (each set stacks on top of each other).
|
abstract float |
get(int set,
int cat,
int item) |
double[][] |
getCatCounts()
Sum the contents of the dataset and return a 2D array by Catagory and set
|
double[] |
getCounts()
sum the contents of the dataset returning an array by set
|
java.lang.String[] |
getLabels()
get a set of labels for the major intervals.
|
java.lang.String[] |
getLegends()
get the legend strings
|
abstract int |
getNumCats() |
abstract int |
getNumItems() |
java.util.Iterator<TimePeriod> |
getSubPeriods()
get an
Iterator over the time periods in the sequence. |
Table |
getTable(java.lang.String quantity)
create a table from a Plot for this Timechart
|
boolean |
hasLegends() |
abstract boolean |
isCummulative()
Does this plot represent a cummulative plot.
|
boolean |
isUsingLogSearch() |
void |
permSets(int new_nset,
int[] perm)
permute the contents of the sets in a Dataset
labels are also permuted/truncated.
|
void |
rateScale(double scale)
rescale a dataset by constant divided by number of miliseconds
|
void |
scale(float scale)
rescale all the data by a factor
|
void |
scaleCopy(double scale,
int src,
int dest)
rescale one set of a dataset and store result in a different set.
|
void |
scaleCumulative(double scale,
double[] initial)
Convert the data-set to a cumulative graph.
|
abstract void |
set(int nset,
int cat,
int item,
float value) |
void |
setLegends(java.lang.String[] leg)
set the legends strings These are the labels for the different sets in this
SetPlot |
void |
setNumSets(int nset)
set Number of sets in this
SetPlot |
protected abstract void |
setSize(int new_nset,
int numCats,
int numItems) |
void |
setSplits(int nset,
SplitTimePeriod p,
int minor,
boolean need_multi) |
void |
setUsingLogSearch(boolean usingLogSearch) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNumSets
public abstract int getNumCats()
public abstract int getNumItems()
public abstract float get(int set, int cat, int item)
public abstract void set(int nset, int cat, int item, float value)
public abstract void add(int nset, int cat, int item, float value)
public java.lang.String[] getLegends()
SetPlot
getLegends
in interface SetPlot
public void setLegends(java.lang.String[] leg)
SetPlot
SetPlot
setLegends
in interface SetPlot
public boolean hasLegends()
hasLegends
in interface SetPlot
public void permSets(int new_nset, int[] perm)
SetPlot
public void setUsingLogSearch(boolean usingLogSearch)
public void scale(float scale)
Plot
public void setNumSets(int nset)
SetPlot
SetPlot
setNumSets
in interface SetPlot
protected abstract void setSize(int new_nset, int numCats, int numItems)
public abstract void doConvertToStacked()
PeriodSequencePlot
doConvertToStacked
in interface PeriodSequencePlot
public abstract boolean isCummulative()
#getCatCounts(boolean)
public Table getTable(java.lang.String quantity)
public boolean isUsingLogSearch()
public final double[][] getCatCounts()
public final double[] getCounts()
SetPlot
public <D> void addData(SetRangeMapper<D> t, D o) throws java.lang.Exception
addData
in interface PeriodPlot
ds
- t
- o
- java.lang.Exception
InvalidTransformException
public <F> boolean addMapData(QueryMapper<F> t, F o) throws InvalidTransformException
PeriodPlot
QueryMapper
and a factory
Each point of the graph is generated by a call to the QueryMapper
addMapData
in interface PeriodPlot
F
- type of factoryt
- QueryMapper to useo
- Factory to queryInvalidTransformException
public java.util.Iterator<TimePeriod> getSubPeriods()
PeriodSequencePlot
Iterator
over the time periods in the sequence.getSubPeriods
in interface PeriodSequencePlot
public void setSplits(int nset, SplitTimePeriod p, int minor, boolean need_multi) throws InvalidArgument
InvalidArgument
public java.lang.String[] getLabels()
public void rateScale(double scale)
rateScale
in interface PeriodSequencePlot
ds
- scale
- public void datasetScale(double scale, PeriodSequencePlot nm)
datasetScale
in interface PeriodSequencePlot
ds
- scale
- norm
- public void scaleCopy(double scale, int src, int dest)
scaleCopy
in interface PeriodSequencePlot
ds
- scale
- src
- dest
- public void scaleCumulative(double scale, double[] initial)
PeriodSequencePlot
scaleCumulative
in interface PeriodSequencePlot