|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.swtchart.internal.compress.Compress
public abstract class Compress
A base class for compressor providing default implementations.
Field Summary | |
---|---|
protected boolean |
compressed
the flag indicating whether the data is compressed |
protected int[] |
compressedIndexes
the compressed series indexes |
protected double[] |
compressedXSeries
the compressed X series |
protected double[] |
compressedYSeries
the compressed Y series |
protected CompressConfig |
config
the configuration for compressor |
protected CompressConfig |
prevConfig
the previous configuration for compressor |
protected int |
previousXGridIndex
the previous X grid index |
protected int |
previousYGridIndex
the previous Y grid index |
protected double |
xLower
the lower value of x range |
protected double[] |
xSeries
the source X series to be compressed |
protected double |
xUpper
the upper value of x range |
protected double |
yLower
the lower value of y range |
protected double[] |
ySeries
the source Y series to be compressed |
protected double |
yUpper
the upper value of y range |
Constructor Summary | |
---|---|
Compress()
|
Method Summary | |
---|---|
protected abstract void |
addNecessaryPlots(java.util.ArrayList<java.lang.Double> xList,
java.util.ArrayList<java.lang.Double> yList,
java.util.ArrayList<java.lang.Integer> indexList)
Adds the necessary plots. |
protected void |
addToList(java.util.ArrayList<java.lang.Double> xList,
java.util.ArrayList<java.lang.Double> yList,
java.util.ArrayList<java.lang.Integer> indexList,
double x,
double y,
int index)
Adds the given coordinate to list. |
boolean |
compress(CompressConfig compressConfig)
Ignores the points which are in the same grid as the previous point. |
int[] |
getCompressedIndexes()
Gets the compressed series indexes |
double[] |
getCompressedXSeries()
Gets the compressed X series |
double[] |
getCompressedYSeries()
Gets the compressed Y series |
protected boolean |
isInSameGridAsPrevious(double x,
double y)
Checks if the given coordinate is in the same grid as previous. |
void |
setXSeries(double[] xSeries)
Sets X series which have to be sorted. |
void |
setYSeries(double[] ySeries)
sets the Y series |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int previousXGridIndex
protected int previousYGridIndex
protected CompressConfig config
protected CompressConfig prevConfig
protected boolean compressed
protected double[] xSeries
protected double[] ySeries
protected transient double[] compressedXSeries
protected transient double[] compressedYSeries
protected transient int[] compressedIndexes
protected double xLower
protected double xUpper
protected double yLower
protected double yUpper
Constructor Detail |
---|
public Compress()
Method Detail |
---|
public void setXSeries(double[] xSeries)
ICompress
setXSeries
in interface ICompress
xSeries
- the X seriespublic void setYSeries(double[] ySeries)
ICompress
setYSeries
in interface ICompress
ySeries
- the Y seriespublic double[] getCompressedXSeries()
ICompress
getCompressedXSeries
in interface ICompress
public double[] getCompressedYSeries()
ICompress
getCompressedYSeries
in interface ICompress
public int[] getCompressedIndexes()
ICompress
getCompressedIndexes
in interface ICompress
public final boolean compress(CompressConfig compressConfig)
ICompress
compress
in interface ICompress
compressConfig
- the configuration for compression
protected abstract void addNecessaryPlots(java.util.ArrayList<java.lang.Double> xList, java.util.ArrayList<java.lang.Double> yList, java.util.ArrayList<java.lang.Integer> indexList)
xList
- the array in which x coordinate for necessary plot is storedyList
- the array in which y coordinate for necessary plot is storedindexList
- the array in which series index for necessary plot is storedprotected void addToList(java.util.ArrayList<java.lang.Double> xList, java.util.ArrayList<java.lang.Double> yList, java.util.ArrayList<java.lang.Integer> indexList, double x, double y, int index)
xList
- the list to store the X coordinateyList
- the list to store the Y coordinateindexList
- the list to store the series indexx
- the X coordinatey
- the Y coordinateindex
- the series indexprotected boolean isInSameGridAsPrevious(double x, double y)
x
- the X coordinatey
- the Y coordinate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |