|
ProteoWizard
|
Namespaces | |
| utilities | |
Functions | |
| template<typename TReal > | |
| void | seq (TReal from, TReal to, std::vector< TReal > &result) |
| generates the sequence from, from+/-1, ..., to (identical to from:to). More... | |
| template<typename TReal > | |
| void | seq (TReal from, TReal to, TReal by, std::vector< TReal > &result) |
| generates sequence: from, from+by, from + 2*by, ..., up to a sequence value less than, or equal than to. More... | |
| template<typename TReal > | |
| void | seq_length (TReal from, TReal to, unsigned int length, std::vector< TReal > &result) |
| generates sequence: from, to of length calls seq with $[ by = ( ( to - from ) / ( length - 1. More... | |
| template<typename T1 , typename T2 > | |
| void | seq (std::vector< T1 > &ref, std::vector< T2 > &res) |
| generates the sequence 1, 2, ..., length(ref), unless the argument is numeric of length 1 when it is interpreted as 1:from (even for seq(0) for compatibility with S). More... | |
| template<typename TSize , typename TReal > | |
| boost::enable_if< boost::is_integral< TSize >, void >::type | seq (TSize length, std::vector< TReal > &res) |
| Generates Sequence 1,2,3,....length . More... | |
| template<typename InputIterator > | |
| std::iterator_traits< InputIterator >::value_type | mean (InputIterator begin, InputIterator end) |
| MEAN Trimmed arithmetic mean. More... | |
| template<typename TReal > | |
| TReal | mean (const std::vector< TReal > &x) |
| mean More... | |
| template<typename TReal > | |
| TReal | mean (const std::vector< TReal > &x, TReal trim) |
| mean More... | |
| template<class Iter_T > | |
| std::iterator_traits< Iter_T >::value_type | geometricMean (Iter_T first, Iter_T last) |
| computes the mean More... | |
| template<typename TReal > | |
| void | Range (const std::vector< TReal > &values, std::pair< TReal, TReal > &range) |
| Range of Values range returns a std::pair containing minimum and maximum of all the given values. More... | |
| template<typename T > | |
| double | max3 (T a, T b, T c) |
| maximum of 3 numbers More... | |
| template<typename TReal > | |
| TReal | log2 (TReal test) |
| log base 2 More... | |
| template<typename InputIterator , typename OutputIterator , typename TN > | |
| OutputIterator | diff (InputIterator begin, InputIterator end, OutputIterator destBegin, TN lag) |
| lagged differences More... | |
| template<typename InputIterator , typename TN > | |
| InputIterator | diff (InputIterator begin, InputIterator end, TN lag, TN differences) |
| lagged difference More... | |
| template<typename YInputIterator , typename XInputIterator , typename OutputIterator > | |
| void | interpolate_linear (YInputIterator begY, YInputIterator endY, XInputIterator begX, XInputIterator endX, OutputIterator out, int start_index=0, typename std::iterator_traits< OutputIterator >::value_type epsilon=std::numeric_limits< typename std::iterator_traits< OutputIterator >::value_type >::epsilon()) |
| affine interpolation on equidistantly spaced y. More... | |
| template<typename YInputIterator , typename XInputIterator , typename OutputIterator > | |
| void | interpolate_cosine (YInputIterator begY, YInputIterator endY, XInputIterator begX, XInputIterator endX, OutputIterator out, int start_index=0) |
| cosine interpolation on equidistantly spaced y. More... | |
| template<typename YInputIterator , typename XInputIterator , typename OutputIterator > | |
| void | interpolate_cubic (YInputIterator begY, YInputIterator endY, XInputIterator begX, XInputIterator endX, OutputIterator out, int start_index=0, typename std::iterator_traits< OutputIterator >::value_type epsilon=std::numeric_limits< typename std::iterator_traits< OutputIterator >::value_type >::epsilon()) |
| cubic interpolation on equidistantly spaced y's. More... | |
| template<typename YInputIterator , typename XInputIterator , typename OutputIterator > | |
| void | interpolate_Hermite (YInputIterator begY, YInputIterator endY, XInputIterator begX, XInputIterator endX, OutputIterator out, double tension=0, double bias=0, int start_index=0, typename std::iterator_traits< OutputIterator >::value_type epsilon=std::numeric_limits< typename std::iterator_traits< OutputIterator >::value_type >::epsilon()) |
| Hermite interpolation on equidistantly spaced y's. More... | |
| void ralab::base::base::seq | ( | TReal | from, |
| TReal | to, | ||
| std::vector< TReal > & | result | ||
| ) |
generates the sequence from, from+/-1, ..., to (identical to from:to).
| [in] | from | the starting value of the sequence |
| [in] | to | the end value of the sequence |
| [out] | result | result sequence |
Definition at line 49 of file base.hpp.
Referenced by ralab::base::filter::getGaussian1DerFilter(), ralab::base::filter::getGaussian1DerFilterQuantile(), ralab::base::filter::getGaussianFilterQuantile(), and seq_length().
| void ralab::base::base::seq | ( | TReal | from, |
| TReal | to, | ||
| TReal | by, | ||
| std::vector< TReal > & | result | ||
| ) |
generates sequence: from, from+by, from + 2*by, ..., up to a sequence value less than, or equal than to.
Specifying to < from and by of positive sign is an error.
| [in] | from | the starting value of the sequence |
| [in] | to | the end value of the sequence |
| [in] | by | number: increment of the sequence |
| [out] | result | result sequence |
Definition at line 74 of file base.hpp.
| void ralab::base::base::seq_length | ( | TReal | from, |
| TReal | to, | ||
| unsigned int | length, | ||
| std::vector< TReal > & | result | ||
| ) |
generates sequence: from, to of length calls seq with $[ by = ( ( to - from ) / ( length - 1.
) ) $]
| [in] | from | the starting value of the sequence |
| [in] | to | the end value of the sequence |
| [in] | length | length of sequence |
| [out] | result | result sequence |
Definition at line 111 of file base.hpp.
References seq().
| void ralab::base::base::seq | ( | std::vector< T1 > & | ref, |
| std::vector< T2 > & | res | ||
| ) |
generates the sequence 1, 2, ..., length(ref), unless the argument is numeric of length 1 when it is interpreted as 1:from (even for seq(0) for compatibility with S).
| [in] | ref | take the length from the length of this argument. |
| [out] | res | result sequence |
| boost::enable_if<boost::is_integral<TSize>, void>::type ralab::base::base::seq | ( | TSize | length, |
| std::vector< TReal > & | res | ||
| ) |
Generates Sequence 1,2,3,....length .
Generates 1, 2, ..., length unless length.out = 0, when it generates integer(0).
| [in] | length | length of sequence |
| [out] | res | result sequence |
|
inline |
MEAN Trimmed arithmetic mean.
mean(x, trim = 0, na.rm = FALSE, ...) Arguments x An R object. Currently there are methods for numeric data frames, numeric vectors and dates. A complex vector is allowed for trim = 0, only. trim the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values outside that range are taken as the nearest endpoint. na.rm a logical value indicating whether NA values should be stripped before the computation proceeds. ... further arguments passed to or from other methods. Value For a data frame, a named vector with the appropriate method being applied column by column. If trim is zero (the default), the arithmetic mean of the values in x is computed, as a numeric or complex vector of length one. If x is not logical (coerced to numeric), integer, numeric or complex, NA is returned, with a warning. If trim is non-zero, a symmetrically trimmed mean is computed with a fraction of trim observations deleted from each end before the mean is computed.
| [in] | begin | |
| [in] | end |
Definition at line 187 of file base.hpp.
Referenced by ralab::base::stats::scale(), and test().
|
inline |
| TReal ralab::base::base::mean | ( | const std::vector< TReal > & | x, |
| TReal | trim | ||
| ) |
| std::iterator_traits<Iter_T>::value_type ralab::base::base::geometricMean | ( | Iter_T | first, |
| Iter_T | last | ||
| ) |
| void ralab::base::base::Range | ( | const std::vector< TReal > & | values, |
| std::pair< TReal, TReal > & | range | ||
| ) |
Range of Values range returns a std::pair containing minimum and maximum of all the given values.
| [in] | values | data |
| [out] | range | range |
|
inline |
|
inline |
| OutputIterator ralab::base::base::diff | ( | InputIterator | begin, |
| InputIterator | end, | ||
| OutputIterator | destBegin, | ||
| TN | lag | ||
| ) |
lagged differences
DIFF Lagged and iterated differences.
for more detials see R::base::diff <br>
diff(x, ...) <br>
## Default S3 method: <br>
diff(x, lag = 1, differences = 1, ...) <br>\return .end() Iterator in destination container.
| [in] | begin | begin |
| [in] | end | end |
| [out] | destBegin | dest begin |
| [in] | lag | an integer indicating which lag to use. |
Definition at line 58 of file diff.hpp.
Referenced by ralab::base::resample::SamplingWith::operator()().
| InputIterator ralab::base::base::diff | ( | InputIterator | begin, |
| InputIterator | end, | ||
| TN | lag, | ||
| TN | differences | ||
| ) |
| void ralab::base::base::interpolate_linear | ( | YInputIterator | begY, |
| YInputIterator | endY, | ||
| XInputIterator | begX, | ||
| XInputIterator | endX, | ||
| OutputIterator | out, | ||
| int | start_index = 0, |
||
| typename std::iterator_traits< OutputIterator >::value_type | epsilon = std::numeric_limits<typename std::iterator_traits<OutputIterator>::value_type>::epsilon() |
||
| ) |
affine interpolation on equidistantly spaced y.
The y's are located at 0,1,2....,len(y). For x's < 0 or x's > len(y) y[0] or y[len(y) -1 ] is used.
| begY | y values equidistantly spaced. spacing is [0,1,2, .... ,len(y)] |
| begX | points to interpolate at |
| out | interpolated values, same length as x. |
| start_index | if y values are placed on a grid with start_index != 0 |
Definition at line 58 of file interpolate.hpp.
References epsilon, and ralab::base::base::utilities::interpolateLinearCosine().
Referenced by ralab::base::ms::PeakPicker< TReal, TIntegrator >::operator()().
| void ralab::base::base::interpolate_cosine | ( | YInputIterator | begY, |
| YInputIterator | endY, | ||
| XInputIterator | begX, | ||
| XInputIterator | endX, | ||
| OutputIterator | out, | ||
| int | start_index = 0 |
||
| ) |
cosine interpolation on equidistantly spaced y.
The y's are located at 0,1,2....,len(y). For x's < 0 or x's > len(y) y[0] or y[len(y) -1 ] is used.
| begY | y values equidistantly spaced. spacing is [0,1,2, .... ,len(y)] |
| begX | points to interpolate at |
| out | interpolated values, same length as x. |
| start_index | if y values are placed on a grid with start_index != 0 |
Definition at line 83 of file interpolate.hpp.
References ralab::base::base::utilities::interpolateLinearCosine().
| void ralab::base::base::interpolate_cubic | ( | YInputIterator | begY, |
| YInputIterator | endY, | ||
| XInputIterator | begX, | ||
| XInputIterator | endX, | ||
| OutputIterator | out, | ||
| int | start_index = 0, |
||
| typename std::iterator_traits< OutputIterator >::value_type | epsilon = std::numeric_limits<typename std::iterator_traits<OutputIterator>::value_type>::epsilon() |
||
| ) |
cubic interpolation on equidistantly spaced y's.
The y's are located at 0,1,2....,len(y). For x's < 0 or x's > len(y) y[0] or y[len(y) -1 ] is used.
| begY | y values equidistantly spaced. spacing is [0,1,2, .... ,len(y)] |
| begX | points to interpolate at |
| out | interpolated values, same length as x. |
| start_index | if y values are placed on a grid with start_index != 0 |
Definition at line 105 of file interpolate.hpp.
References epsilon, and ralab::base::base::utilities::interpolateCubicHermite().
Referenced by ralab::base::ms::PeakPicker< TReal, TIntegrator >::operator()().
| void ralab::base::base::interpolate_Hermite | ( | YInputIterator | begY, |
| YInputIterator | endY, | ||
| XInputIterator | begX, | ||
| XInputIterator | endX, | ||
| OutputIterator | out, | ||
| double | tension = 0, |
||
| double | bias = 0, |
||
| int | start_index = 0, |
||
| typename std::iterator_traits< OutputIterator >::value_type | epsilon = std::numeric_limits<typename std::iterator_traits<OutputIterator>::value_type>::epsilon() |
||
| ) |
Hermite interpolation on equidistantly spaced y's.
The y's are located at 0,1,2....,len(y). For x's < 0 or x's > len(y) y[0] or y[len(y) -1 ] is used.
| begY | y values equidistantly spaced. spacing is [0,1,2, .... ,len(y)] |
| begX | points to interpolate at |
| out | interpolated values, same length as x. |
| tension | 1 is high, 0 normal, -1 is low |
| bias | 0 is even, positive is towards first segment, negative towards the other |
| start_index | if y values are placed on a grid with start_index != 0 |
Definition at line 130 of file interpolate.hpp.
References epsilon, and ralab::base::base::utilities::interpolateCubicHermite().
1.8.13