Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/structcasa_1_1ArrayPartMath__global__functions__Array__partial__operations.html
Дата изменения: Unknown Дата индексирования: Tue Feb 15 00:48:54 2011 Кодировка: Поисковые слова: р с р р с с с с р р с р с с р р |
Mathematical and logical operations for Array parts. More...
#include <ArrayPartMath.h>
Classes | |
class | AvdevFunc |
class | FractileFunc |
class | MaxFunc |
class | MeanFunc |
class | MedianFunc |
class | MinFunc |
class | ProductFunc |
class | RmsFunc |
class | StddevFunc |
class | SumFunc |
class | VarianceFunc |
Public Member Functions | |
template<class T > | |
Array< T > | partialSums (const Array< T > &array, const IPosition &collapseAxes) |
Determine the sum, product, etc. | |
template<class T > | |
Array< T > | partialProducts (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialMins (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialMaxs (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialMeans (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialVariances (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialVariances (const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means) |
template<class T > | |
Array< T > | partialStddevs (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialStddevs (const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means) |
template<class T > | |
Array< T > | partialAvdevs (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialAvdevs (const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means) |
template<class T > | |
Array< T > | partialRmss (const Array< T > &array, const IPosition &collapseAxes) |
template<class T > | |
Array< T > | partialMedians (const Array< T > &array, const IPosition &collapseAxes, Bool takeEvenMean=False, Bool inPlace=False) |
template<class T > | |
Array< T > | partialFractiles (const Array< T > &array, const IPosition &collapseAxes, Float fraction, Bool inPlace=False) |
template<typename T , typename FuncType > | |
Array< T > | boxedArrayMath (const Array< T > &array, const IPosition &boxSize, const FuncType &funcObj) |
Apply the given ArrayMath reduction function objects to each box in the array. | |
template<typename T , typename FuncType > | |
Array< T > | slidingArrayMath (const Array< T > &array, const IPosition &halfBoxSize, const FuncType &funcObj, Bool fillEdge=True) |
Apply for each element in the array the given ArrayMath reduction function object to the box around that element. |
Mathematical and logical operations for Array parts.
This file contains global functions which perform part by part mathematical or logical operations on arrays.
These functions perform chunk by chunk mathematical operations on arrays. In particular boxed and sliding operations are possible. E.g. to calculate the median in sliding windows making it possible to subtract the background in an image.
The operations to be performed are defined by means of functors that reduce an array subset to a scalar. Those functors are wrappers for ArrayMath and ArrayLogical functions like sum, median, and ntrue.
The partialXX
functions are a special case of the BoxedArrayMath
function. They reduce one or more entire axes which can be done in a faster way than the more general boxedArrayMath
function.
Array<Double> data(...); Array<Double> means = partialMeans (data, IPosition(2,0,1));
This example calculates the mean of each plane in the data array.
IPosition shp = data.shape(); Array<Double> means = boxedArrayMath (data, IPosition(2,shp[0],shp[1]), SumFunc<Double>());
does the same as the first example. Note that in this example the box is formed by the entire axes, but it could also be a subset of it to average, say, boxes of 5*5 elements.
Definition at line 91 of file ArrayPartMath.h.
Array<T> casa::ArrayPartMath_global_functions_Array_partial_operations::boxedArrayMath | ( | const Array< T > & | array, | |
const IPosition & | boxSize, | |||
const FuncType & | funcObj | |||
) |
Apply the given ArrayMath reduction function objects to each box in the array.
Downsample an array by taking the median of every [25,25] elements.
Array<Float> downArr = boxedArrayMath(in, IPosition(2,25,25), MedianFunc<Float>());
The dimensionality of the array can be larger than the box; in that case the missing axes of the box are assumed to have length 1. A box axis length <= 0 means the full array axis.
Array<T> casa::ArrayPartMath_global_functions_Array_partial_operations::partialAvdevs | ( | const Array< T > & | array, | |
const IPosition & | collapseAxes, | |||
const Array< T > & | means | |||
) |
Array<T> casa::ArrayPartMath_global_functions_Array_partial_operations::partialAvdevs | ( | const Array< T > & | array, | |
const IPosition & | collapseAxes | |||
) | [inline] |
Definition at line 136 of file ArrayPartMath.h.
Array<T> casa::ArrayPartMath_global_functions_Array_partial_operations::partialFractiles | ( | const Array< T > & | array, | |
const IPosition & | collapseAxes, | |||
Float | fraction, | |||
Bool | inPlace = False | |||
) |
Array<T> casa::ArrayPartMath_global_functions_Array_partial_operations::partialMaxs | ( | const Array< T > & | array, | |
const IPosition & | collapseAxes | |||
) |
Array<T> casa::ArrayPartMath_global_functions_Array_partial_operations::partialMeans | ( | const Array< T > & | array, | |
const IPosition & | collapseAxes | |||
) |