LinearInterpolation
- class pyopenms.LinearInterpolation
Bases:
objectCython implementation of _LinearInterpolation[double,double]
Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS::Math_1_1LinearInterpolation[double,double].html
Provides access to linearly interpolated values (and derivatives) from discrete data points. Values beyond the given range of data points are implicitly taken as zero. —– The input is just a vector of values (“Data”). These are interpreted as the y-coordinates at the x-coordinate positions 0,…,data_.size-1. —– The interpolated data can also be scaled and shifted in the x-dimension by an affine mapping. That is, we have “inside” and “outside” x-coordinates. The affine mapping can be specified in two ways: - using setScale() and setOffset(), - using setMapping() —– By default the identity mapping (scale=1, offset=0) is used. —– Using the value() and derivative() methods you can sample linearly interpolated values for a given x-coordinate position of the data and the derivative of the data
- __init__()
Cython signature: void LinearInterpolation()
Cython signature: void LinearInterpolation(LinearInterpolation &)
Cython signature: void LinearInterpolation(double scale, double offset)
Methods
Cython signature: void LinearInterpolation()
Cython signature: void addValue(double arg_pos, double arg_value) Performs linear resampling.
Cython signature: double derivative(double arg_pos) Returns the interpolated derivative
Cython signature: bool empty() Returns true if getData() is empty
Cython signature: libcpp_vector[double] getData() Returns the internal random access container from which interpolated values are being sampled
Cython signature: double getInsideReferencePoint()
Cython signature: double getOffset() "Offset" is the point (in "outside" units) which corresponds to "Data[0]"
Cython signature: double getOutsideReferencePoint()
Cython signature: double getScale() "Scale" is the difference (in "outside" units) between consecutive entries in "Data"
Cython signature: double index2key(double pos) The transformation from "inside" to "outside" coordinates
Cython signature: double key2index(double pos) The transformation from "outside" to "inside" coordinates
Cython signature: void setData(libcpp_vector[double] & data) Assigns data to the internal random access container from which interpolated values are being sampled
Cython signature: void setMapping(double & scale, double & inside, double & outside)
Cython signature: void setOffset(double & offset) "Offset" is the point (in "outside" units) which corresponds to "Data[0]"
Cython signature: void setScale(double & scale) "Scale" is the difference (in "outside" units) between consecutive entries in "Data"
Cython signature: double supportMax()
Cython signature: double supportMin()
Cython signature: double value(double arg_pos) Returns the interpolated value
- addValue()
Cython signature: void addValue(double arg_pos, double arg_value) Performs linear resampling. The arg_value is split up and added to the data points around arg_pos
- derivative()
Cython signature: double derivative(double arg_pos) Returns the interpolated derivative
- empty()
Cython signature: bool empty() Returns true if getData() is empty
- getData()
Cython signature: libcpp_vector[double] getData() Returns the internal random access container from which interpolated values are being sampled
- getInsideReferencePoint()
Cython signature: double getInsideReferencePoint()
- getOffset()
Cython signature: double getOffset() “Offset” is the point (in “outside” units) which corresponds to “Data[0]”
- getOutsideReferencePoint()
Cython signature: double getOutsideReferencePoint()
- getScale()
Cython signature: double getScale() “Scale” is the difference (in “outside” units) between consecutive entries in “Data”
- index2key()
Cython signature: double index2key(double pos) The transformation from “inside” to “outside” coordinates
- key2index()
Cython signature: double key2index(double pos) The transformation from “outside” to “inside” coordinates
- setData()
Cython signature: void setData(libcpp_vector[double] & data) Assigns data to the internal random access container from which interpolated values are being sampled
- setMapping()
Cython signature: void setMapping(double & scale, double & inside, double & outside)
Cython signature: void setMapping(double & inside_low, double & outside_low, double & inside_high, double & outside_high)
- setOffset()
Cython signature: void setOffset(double & offset) “Offset” is the point (in “outside” units) which corresponds to “Data[0]”
- setScale()
Cython signature: void setScale(double & scale) “Scale” is the difference (in “outside” units) between consecutive entries in “Data”
- supportMax()
Cython signature: double supportMax()
- supportMin()
Cython signature: double supportMin()
- value()
Cython signature: double value(double arg_pos) Returns the interpolated value