simtools.data
Class SinusSource
java.lang.Object
simtools.data.ValueProvider
simtools.data.DataSource
simtools.data.SinusSource
- All Implemented Interfaces:
- java.io.Serializable
public class SinusSource
- extends DataSource
- implements java.io.Serializable
- See Also:
- Serialized Form
Constructor Summary |
SinusSource(double freq,
double phase,
double amplitude,
double ofst,
long start,
long end)
|
Methods inherited from class simtools.data.DataSource |
addEndNotificationListener, addListener, computeSortedOrder, createEmptyDataSource, equals, getAuxiliarySources, getByteMax, getByteMin, getChoiceFormat, getDataSourceInformationClass, getDoubleMax, getDoubleMin, getFloatMax, getFloatMin, getIntegerMax, getIntegerMin, getLongMax, getLongMin, getShortMax, getShortMin, getSortedOrder, getSourceDependencies, isAuxiliary, isComparable, isCompound, notifyEndNotificationListeners, notifyListenersForDataReplaced, notifyListenersForDataReplaced, notifyListenersForIndexRangeChange, notifyListenersForInfoChange, notifyListenersForOrderChange, notifyListenersForValueChange, notifyListenersForValueRangeChange, removeEndNotificationListener, removeListener, updateSortedOrder |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_freq
protected double _freq
_phase
protected double _phase
_amplitude
protected double _amplitude
_ofst
protected double _ofst
_start
protected long _start
_end
protected long _end
SinusSource
public SinusSource(double freq,
double phase,
double amplitude,
double ofst,
long start,
long end)
getInformation
public DataInfo getInformation()
- Overrides:
getInformation
in class DataSource
getMin
public java.lang.Object getMin()
throws UnsupportedOperation
- Description copied from class:
DataSource
- Return values if possibly only, without expensive computations.
- Overrides:
getMin
in class DataSource
- Throws:
UnsupportedOperation
getMax
public java.lang.Object getMax()
throws UnsupportedOperation
- Overrides:
getMax
in class DataSource
- Throws:
UnsupportedOperation
getStartIndex
public long getStartIndex()
throws UnsupportedOperation
- Overrides:
getStartIndex
in class DataSource
- Throws:
UnsupportedOperation
getLastIndex
public long getLastIndex()
throws UnsupportedOperation
- Overrides:
getLastIndex
in class DataSource
- Throws:
UnsupportedOperation
computeMin
public java.lang.Object computeMin()
throws UnsupportedOperation
- Force the computation if possible. The operation may take some time.
- Overrides:
computeMin
in class DataSource
- Throws:
UnsupportedOperation
computeMax
public java.lang.Object computeMax()
throws UnsupportedOperation
- Overrides:
computeMax
in class DataSource
- Throws:
UnsupportedOperation
computeStartIndex
public long computeStartIndex()
throws UnsupportedOperation
- Overrides:
computeStartIndex
in class DataSource
- Throws:
UnsupportedOperation
computeLastIndex
public long computeLastIndex()
throws UnsupportedOperation
- Overrides:
computeLastIndex
in class DataSource
- Throws:
UnsupportedOperation
setSlice
public void setSlice(long min,
long max)
- Description copied from class:
DataSource
- Sets a region of interest in the DataSource. This is a purely informative
function, but the DataSource may use this information to optimize itself
on this specific range.
- Overrides:
setSlice
in class DataSource
getDoubleValue
public double getDoubleValue(long index)
- Optimize for double access
getValue calls this function and wraps a Double around
- Overrides:
getDoubleValue
in class ValueProvider
getValue
public java.lang.Object getValue(long index)
throws DataException
- Specified by:
getValue
in class ValueProvider
- Throws:
DataException
valueClass
public java.lang.Class valueClass()
- Description copied from class:
ValueProvider
- Returns the more specialized superclass of all objects returned by this provider.
Returns Object by default in the base implementation, subclass should specialize if possible.
- Overrides:
valueClass
in class ValueProvider
sortedOrder
public int sortedOrder()
- Description copied from class:
DataSource
- Check if the values are sorted or not. This is usefull to optimize some
computations (curves drawing for instance)
- Overrides:
sortedOrder
in class DataSource
- Returns:
- 0 if the values are not sorted, 1 if the values are sorted in
ascending order and -1 if the values are sorted in descending
order
update
public void update()
throws UnsupportedOperation
- Throws:
UnsupportedOperation