tuple_histo_rangeT_tuple_histo_rangeTupleHistoRangeTupleHistoRangetuple_histo_range (算子)

名称

tuple_histo_rangeT_tuple_histo_rangeTupleHistoRangeTupleHistoRangetuple_histo_range — 计算一个元组在某个值范围内的值分布。

签名

tuple_histo_range( : : Tuple, Min, Max, NumBins : Histo, BinSize)

Herror T_tuple_histo_range(const Htuple Tuple, const Htuple Min, const Htuple Max, const Htuple NumBins, Htuple* Histo, Htuple* BinSize)

void TupleHistoRange(const HTuple& Tuple, const HTuple& Min, const HTuple& Max, const HTuple& NumBins, HTuple* Histo, HTuple* BinSize)

HTuple HTuple::TupleHistoRange(const HTuple& Min, const HTuple& Max, const HTuple& NumBins, HTuple* BinSize) const

static void HOperatorSet.TupleHistoRange(HTuple tuple, HTuple min, HTuple max, HTuple numBins, out HTuple histo, out HTuple binSize)

HTuple HTuple.TupleHistoRange(HTuple min, HTuple max, HTuple numBins, out HTuple binSize)

def tuple_histo_range(tuple: Sequence[Union[float, int]], min: Union[float, int], max: Union[float, int], num_bins: int) -> Tuple[Sequence[int], float]

def tuple_histo_range_s(tuple: Sequence[Union[float, int]], min: Union[float, int], max: Union[float, int], num_bins: int) -> Tuple[int, float]

描述

tuple_histo_rangetuple_histo_rangeTupleHistoRangeTupleHistoRangeTupleHistoRangetuple_histo_range calculates the value distribution HistoHistoHistoHistohistohisto of the TupleTupleTupleTupletupletuple within the value range [MinMinMinMinminmin,MaxMaxMaxMaxmaxmax]. The values for MinMinMinMinminmin and MaxMaxMaxMaxmaxmax are rounded down to the next integer if all entries of the TupleTupleTupleTupletupletuple are of type integer. The value range is divided into NumBinsNumBinsNumBinsNumBinsnumBinsnum_bins bins of the same size, which is returned in BinSizeBinSizeBinSizeBinSizebinSizebin_size. If a value lies between two bins the value is assigned to the smaller bin. If the TupleTupleTupleTupletupletuple has entries of type real . If all entries are of type integer the size of a bin is computed with

例外:空输入元组

If any of the input tuples is empty, an exception is raised.

注意

If all the data of the TupleTupleTupleTupletupletuple are of type integer the value of BinSizeBinSizeBinSizeBinSizebinSizebin_size may cause the following effects: For BinSizeBinSizeBinSizeBinSizebinSizebin_size > 1 multiple consecutive numbers are assigned to the same bin. If BinSizeBinSizeBinSizeBinSizebinSizebin_size is no integer the numbers are distributed uneven among the bins, e.g., for BinSizeBinSizeBinSizeBinSizebinSizebin_size = 1.5 the first and second number are assigned to the first bin, the third number is assigned to the second bin, and the fourth and fifth number are assigned to the third bin. This becomes noticeable in several peeks in the histogram HistoHistoHistoHistohistohisto. If BinSizeBinSizeBinSizeBinSizebinSizebin_size < 1 some classes are not assigned by any number, e.g., for BinSizeBinSizeBinSizeBinSizebinSizebin_size = 0.5 the first number is assigned to the first bin and the second number is assigned to the third bin. The histogram HistoHistoHistoHistohistohisto shows some gaps, which resembles the structure of a comb.

If the TupleTupleTupleTupletupletuple has entries of type real and MinMinMinMinminmin = MaxMaxMaxMaxmaxmax, all entries of the corresponding value are assigned only to the first bin.

执行信息

参数

TupleTupleTupleTupletupletuple (输入控制)  number-array HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Input tuple.

MinMinMinMinminmin (输入控制)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Minimum value.

MaxMaxMaxMaxmaxmax (输入控制)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Maximum value.

限制: Max >= Min

NumBinsNumBinsNumBinsNumBinsnumBinsnum_bins (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of bins.

限制: NumBins >= 1

HistoHistoHistoHistohistohisto (输出控制)  histogram(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Histogram to be calculated.

BinSizeBinSizeBinSizeBinSizebinSizebin_size (输出控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Bin size.

结果

如果参数有效,算子 tuple_histo_rangetuple_histo_rangeTupleHistoRangeTupleHistoRangeTupleHistoRangetuple_histo_range 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

tuple_mintuple_minTupleMinTupleMinTupleMintuple_min, tuple_maxtuple_maxTupleMaxTupleMaxTupleMaxtuple_max

可能的后继

create_funct_1d_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array

另见

gray_histogray_histoGrayHistoGrayHistoGrayHistogray_histo, gray_histo_absgray_histo_absGrayHistoAbsGrayHistoAbsGrayHistoAbsgray_histo_abs, gray_histo_rangegray_histo_rangeGrayHistoRangeGrayHistoRangeGrayHistoRangegray_histo_range

模块

基础