Package pulse.baseline
Class AdjustableBaseline
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.baseline.Baseline
-
- pulse.baseline.AdjustableBaseline
-
- All Implemented Interfaces:
Serializable,Optimisable,Descriptive,Reflexive
- Direct Known Subclasses:
FlatBaseline,LinearBaseline
public abstract class AdjustableBaseline extends Baseline
A baseline that can shift in the vertical direction.- Author:
- Artem Lunev
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class pulse.baseline.Baseline
MIN_BASELINE_POINTS
-
-
Constructor Summary
Constructors Constructor Description AdjustableBaseline(double intercept, double slope)Creates a flat baseline equal to the argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(ParameterVector params)Assigns parameter values of thisOptimisableusing the optimisation vectorparams.NumericPropertygetIntercept()Provides getter accessibility to the intercept as a NumericPropertyNumericPropertygetSlope()Provides getter accessibility to the slope as a NumericPropertySet<NumericPropertyKeyword>listedKeywords()Lists theinterceptas accessible property for thisFlatBaseline.protected doublemean(List<Double> x)voidoptimisationVector(ParameterVector output)Calculates the vector argument defined on to the scalar objective function for thisOptimisable.voidset(NumericPropertyKeyword type, NumericProperty property)An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)NumericProperties in subclasses ofAccessible.voidsetIntercept(NumericProperty intercept)Checks whetherinterceptis a baseline intercept property and updates the respective value of this baseline.voidsetSlope(NumericProperty slope)Checks whetherslopeis a baseline slope property and updates the respective value of this baseline.doublevalueAt(double x)Calculates the linear functiong(x) = intercept + slope*time-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getListeners, getPrefix, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Method Detail
-
valueAt
public double valueAt(double x)
Calculates the linear functiong(x) = intercept + slope*time
-
getIntercept
public NumericProperty getIntercept()
Provides getter accessibility to the intercept as a NumericProperty- Returns:
- a NumericProperty derived from
NumericPropertyKeyword.BASELINE_INTERCEPT where the value is set to that
of
slope
-
setIntercept
public void setIntercept(NumericProperty intercept)
Checks whetherinterceptis a baseline intercept property and updates the respective value of this baseline.- Parameters:
intercept- aNumericPropertyof theBASELINE_INTERCEPTtype- See Also:
set(pulse.properties.NumericPropertyKeyword,pulse.properties.NumericProperty)
-
getSlope
public NumericProperty getSlope()
Provides getter accessibility to the slope as a NumericProperty- Returns:
- a NumericProperty derived from NumericPropertyKeyword.BASELINE_SLOPE with a value equal to slop
-
setSlope
public void setSlope(NumericProperty slope)
Checks whetherslopeis a baseline slope property and updates the respective value of this baseline.- Parameters:
slope- aNumericPropertyof theBASELINE_SLOPEtype- See Also:
set(pulse.properties.NumericPropertyKeyword,pulse.properties.NumericProperty)
-
listedKeywords
public Set<NumericPropertyKeyword> listedKeywords()
Lists theinterceptas accessible property for thisFlatBaseline.- Overrides:
listedKeywordsin classPropertyHolder- Returns:
- a set of
NumericPropertyKeywordinstances, which have been explicitly marked as a listed parameter for thisPropertyHolder. - See Also:
PropertyHolder
-
set
public void set(NumericPropertyKeyword type, NumericProperty property)
Description copied from class:AccessibleAn abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)
NumericProperties in subclasses ofAccessible. Typically this involves aswitchstatement that goes through the different options for thetypeand invokes differentset(...)methods to update the matchingNumericPropertywithproperty.- Specified by:
setin classAccessible- Parameters:
type- the type, which must be equal by definition toproperty.getType().property- the property, which contains new information.
-
optimisationVector
public void optimisationVector(ParameterVector output)
Description copied from interface:OptimisableCalculates the vector argument defined on to the scalar objective function for thisOptimisable.- Parameters:
output- the output vector where the result will be stored
-
assign
public void assign(ParameterVector params)
Description copied from interface:OptimisableAssigns parameter values of thisOptimisableusing the optimisation vectorparams. Only those parameters will be updated, the types of which are listed as indices in theparamsvector.- Parameters:
params- the optimisation vector, containing a similar set of parameters to thisProblem
-
-