|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.ThingImpl visad.DataImpl visad.FunctionImpl visad.FieldImpl visad.FlatField visad.data.CachedFlatField
public class CachedFlatField
This is a FloatField that caches to disk its float array.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class visad.DataImpl |
---|
DataImpl.Syncher |
Field Summary | |
---|---|
protected Object |
MUTEX
Mutex |
int |
mycnt
|
Fields inherited from class visad.FlatField |
---|
RangeCoordinateSystem, RangeCoordinateSystems, RangeUnits, TupleDimension |
Fields inherited from interface visad.Data |
---|
ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE |
Constructor Summary | |
---|---|
CachedFlatField(CachedFlatField that,
boolean copy,
FunctionType type,
Set domainSet,
CoordinateSystem rangeCoordSys,
CoordinateSystem[] rangeCoordSysArray,
Set[] rangeSets,
Unit[] units)
Copy constructor |
|
CachedFlatField(FunctionType type,
float[][] floats)
Create a new CachedFlatField |
|
CachedFlatField(FunctionType type,
Set domainSet)
Create a new CachedFlatField |
|
CachedFlatField(FunctionType type,
Set domainSet,
CoordinateSystem rangeCoordSys,
CoordinateSystem[] rangeCoordSyses,
Set[] rangeSets,
Unit[] units,
float[][] floats)
Create a new CachedFlatField |
|
CachedFlatField(FunctionType type,
Set domainSet,
CoordinateSystem rangeCoordSys,
Set[] rangeSets,
Unit[] units,
float[][] floats)
Create a new CachedFlatField |
|
CachedFlatField(FunctionType type,
Set domainSet,
float[][] floats)
Create a new CachedFlatField |
Method Summary | |
---|---|
void |
clearCachedRange()
Clear the cached ranges |
Object |
clone()
Override method so we clear the caches on the cloned object |
CachedFlatField |
cloneMe(boolean copy,
FunctionType type,
Set domainSet,
CoordinateSystem rangeCoordSys,
CoordinateSystem[] rangeCoordSysArray,
Set[] rangeSets,
Unit[] units)
Clone this object |
void |
finalize()
|
DataRange[] |
getRanges()
Get the ranges |
DataRange[] |
getRanges(boolean force)
Get the ranges |
DataRange[] |
getRanges(float[][] values)
Get the ranges for the values |
Data |
getSample(int index)
Get the range value at the index-th sample. |
boolean |
haveData()
|
protected void |
initCache(float[][] data)
init |
void |
msg(String s)
Debug statment |
float[][] |
readData()
Used to provide a hook to derived classes to dynamically read in the data |
protected void |
readValuesFromParent(CachedFlatField parent)
This gets called to notify derived classes that we jus got the data from the parent ccf |
void |
setSampleRanges(DataRange[] sampleRanges)
Set the sample ranges |
void |
setSamples(float[][] values,
ErrorEstimate[] errors,
boolean copy)
Set the sample |
float[][] |
unpackFloats(boolean copy)
get the float values |
protected float[] |
unpackFloats(int s_index)
Unpack floats |
protected double[][] |
unpackValues(boolean copy)
get the float values as doubles |
Methods inherited from class visad.FieldImpl |
---|
__getitem__, __len__, __setitem__, __setitem__, combine, combine, combine, combine, combine, domainEnumeration, domainFactor, domainFactor, domainMultiply, domainMultiply, domainMultiply, domainMultiply, extract, extract, getDomainCoordinateSystem, getDomainSet, getDomainUnits, getLength, setSample, setSample, setSample, setSamples |
Methods inherited from class visad.FunctionImpl |
---|
__getitem__, __getitem__, evaluate, evaluate, evaluate, evaluate, getDomainDimension, resample |
Methods inherited from class visad.DataImpl |
---|
__add__, __add__, __div__, __div__, __mod__, __mod__, __mul__, __mul__, __neg__, __pow__, __pow__, __radd__, __rdiv__, __rmod__, __rmul__, __rpow__, __rsub__, __sub__, __sub__, abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, notifyReferences, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary |
Methods inherited from class visad.ThingImpl |
---|
addReference, removeReference |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface visad.Field |
---|
domainEnumeration, domainFactor, domainMultiply, domainMultiply, getDomainSet, getLength, setSample, setSample |
Methods inherited from interface visad.Function |
---|
evaluate, evaluate, evaluate, evaluate, getDomainCoordinateSystem, getDomainDimension, getDomainUnits, resample |
Methods inherited from interface visad.Data |
---|
abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary |
Methods inherited from interface visad.Thing |
---|
addReference, removeReference |
Field Detail |
---|
protected transient Object MUTEX
public final int mycnt
Constructor Detail |
---|
public CachedFlatField(FunctionType type, Set domainSet) throws VisADException
type
- Function typedomainSet
- set for this
VisADException
- On badnesspublic CachedFlatField(FunctionType type, float[][] floats) throws VisADException
floats
- The valuestype
- Function type
VisADException
- On badnesspublic CachedFlatField(FunctionType type, Set domainSet, float[][] floats) throws VisADException
floats
- The valuestype
- Function typedomainSet
- Domain
VisADException
- On badnesspublic CachedFlatField(FunctionType type, Set domainSet, CoordinateSystem rangeCoordSys, Set[] rangeSets, Unit[] units, float[][] floats) throws VisADException
type
- Function typedomainSet
- DomainrangeCoordSys
- range CoordSystemrangeSets
- range setsunits
- unitsfloats
- The values
VisADException
- On badnesspublic CachedFlatField(FunctionType type, Set domainSet, CoordinateSystem rangeCoordSys, CoordinateSystem[] rangeCoordSyses, Set[] rangeSets, Unit[] units, float[][] floats) throws VisADException
type
- Function typedomainSet
- DomainrangeCoordSys
- range CoordSystemrangeCoordSyses
- range CoordSystem'srangeSets
- range setsunits
- unitsfloats
- The values
VisADException
- On badnesspublic CachedFlatField(CachedFlatField that, boolean copy, FunctionType type, Set domainSet, CoordinateSystem rangeCoordSys, CoordinateSystem[] rangeCoordSysArray, Set[] rangeSets, Unit[] units) throws VisADException
that
- What we clone fromcopy
- copy the valuestype
- Function typedomainSet
- DomainrangeCoordSys
- range CoordSystemrangeCoordSysArray
- rangeCoordSysArrayrangeSets
- range setsunits
- units
VisADException
- On badnessMethod Detail |
---|
public CachedFlatField cloneMe(boolean copy, FunctionType type, Set domainSet, CoordinateSystem rangeCoordSys, CoordinateSystem[] rangeCoordSysArray, Set[] rangeSets, Unit[] units) throws VisADException
copy
- copy the valuestype
- Function typedomainSet
- Domain setrangeCoordSys
- range CoordSystemrangeCoordSysArray
- rangeCoordSysArrayrangeSets
- range setsunits
- units
VisADException
- On badnesspublic void finalize() throws Throwable
finalize
in class Object
Throwable
public void setSamples(float[][] values, ErrorEstimate[] errors, boolean copy) throws VisADException, RemoteException
setSamples
in interface FlatFieldIface
setSamples
in class FlatField
values
- the sampleserrors
- errorscopy
- tru to copy
RemoteException
- Java RMI Exception
VisADException
- Problem in VisAD landpublic Object clone()
clone
in class FlatField
protected void initCache(float[][] data) throws VisADException
data
- data
VisADException
- initializing fieldpublic void setSampleRanges(DataRange[] sampleRanges)
sampleRanges
- the sample rangespublic void clearCachedRange()
public DataRange[] getRanges() throws VisADException
VisADException
- problem getting rangespublic DataRange[] getRanges(boolean force) throws VisADException
force
- force a recalc
VisADException
- problem getting rangespublic DataRange[] getRanges(float[][] values) throws VisADException
values
- the values
VisADException
- Problem in VisAD landpublic float[][] readData()
public void msg(String s)
s
- message to printpublic boolean haveData()
protected void readValuesFromParent(CachedFlatField parent) throws VisADException
parent
- The parent CCF we read data from
VisADException
public Data getSample(int index) throws VisADException, RemoteException
getSample
in interface Field
getSample
in class FlatField
index
- index of the sample
VisADException
- problem getting data
RemoteException
- problem getting data from remote objectprotected double[][] unpackValues(boolean copy) throws VisADException
unpackValues
in class FlatField
copy
- copy the values
VisADException
- On badnesspublic float[][] unpackFloats(boolean copy) throws VisADException
unpackFloats
in class FlatField
copy
- copy the values
VisADException
- On badnessprotected float[] unpackFloats(int s_index) throws VisADException
unpackFloats
in class FlatField
s_index
- the sample index
VisADException
- Problem in VisAD land
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |