tuple_histo_range T_tuple_histo_range TupleHistoRange TupleHistoRange tuple_histo_range (Operator)
Name
tuple_histo_range T_tuple_histo_range TupleHistoRange TupleHistoRange tuple_histo_range
— Calculate the value distribution of a tuple within a certain value range.
Signature
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]
Description
tuple_histo_range tuple_histo_range TupleHistoRange TupleHistoRange TupleHistoRange tuple_histo_range
calculates the value distribution Histo Histo Histo Histo histo histo
of the Tuple Tuple Tuple Tuple tuple tuple
within the value range [Min Min Min Min min min
,Max Max Max Max max max
].
The values for Min Min Min Min min min
and Max Max Max Max max max
are
rounded down to the next integer if all entries of the Tuple Tuple Tuple Tuple tuple tuple
are
of type integer
. The value range is divided into NumBins NumBins NumBins NumBins numBins num_bins
bins of the same size, which is returned in BinSize BinSize BinSize BinSize binSize bin_size
. If a value
lies between two bins the value is assigned to the smaller bin.
If the Tuple Tuple Tuple Tuple tuple tuple
has entries of type real
. If all entries are of type integer
the size of a bin is
computed with
.
Exception: Empty input tuples
If any of the input tuples is empty, an exception is raised.
Attention
If all the data of the Tuple Tuple Tuple Tuple tuple tuple
are of type integer
the value
of BinSize BinSize BinSize BinSize binSize bin_size
may cause the following effects:
For BinSize BinSize BinSize BinSize binSize bin_size
> 1 multiple consecutive numbers are
assigned to the same bin. If BinSize BinSize BinSize BinSize binSize bin_size
is no integer the numbers
are distributed uneven among the bins, e.g., for
BinSize BinSize BinSize BinSize binSize bin_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 Histo Histo Histo Histo histo histo
. If
BinSize BinSize BinSize BinSize binSize bin_size
< 1 some classes are not assigned by any
number, e.g., for BinSize BinSize BinSize BinSize binSize bin_size
= 0.5 the first number is
assigned to the first bin and the second number is assigned to the third bin.
The histogram Histo Histo Histo Histo histo histo
shows some gaps, which resembles the
structure of a comb.
If the Tuple Tuple Tuple Tuple tuple tuple
has entries of type real
and
Min Min Min Min min min
= Max Max Max Max max max
, all entries of the corresponding value are
assigned only to the first bin.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Processed without parallelization.
Parameters
Tuple Tuple Tuple Tuple tuple tuple
(input_control) number-array →
HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Input tuple.
Min Min Min Min min min
(input_control) number →
HTuple Union[float, int] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Minimum value.
Max Max Max Max max max
(input_control) number →
HTuple Union[float, int] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Maximum value.
Restriction: Max >= Min
NumBins NumBins NumBins NumBins numBins num_bins
(input_control) integer →
HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Number of bins.
Restriction: NumBins >= 1
Histo Histo Histo Histo histo histo
(output_control) histogram(-array) →
HTuple Sequence[int] HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Histogram to be calculated.
BinSize BinSize BinSize BinSize binSize bin_size
(output_control) real →
HTuple float HTuple Htuple (real) (double ) (double ) (double )
Bin size.
Result
If the parameters are valid, the operator tuple_histo_range tuple_histo_range TupleHistoRange TupleHistoRange TupleHistoRange tuple_histo_range
returns the value TRUE. If necessary an exception is raised.
Possible Predecessors
tuple_min tuple_min TupleMin TupleMin TupleMin tuple_min
,
tuple_max tuple_max TupleMax TupleMax TupleMax tuple_max
Possible Successors
create_funct_1d_array create_funct_1d_array CreateFunct1dArray CreateFunct1dArray CreateFunct1dArray create_funct_1d_array
See also
gray_histo gray_histo GrayHisto GrayHisto GrayHisto gray_histo
,
gray_histo_abs gray_histo_abs GrayHistoAbs GrayHistoAbs GrayHistoAbs gray_histo_abs
,
gray_histo_range gray_histo_range GrayHistoRange GrayHistoRange GrayHistoRange gray_histo_range
Module
Foundation