runlength_distributionT_runlength_distributionRunlengthDistributionRunlengthDistributionrunlength_distribution (Operator)

Name

runlength_distributionT_runlength_distributionRunlengthDistributionRunlengthDistributionrunlength_distribution — Distribution of runs needed for runlength encoding of a region.

Signature

runlength_distribution(Region : : : Foreground, Background)

Herror T_runlength_distribution(const Hobject Region, Htuple* Foreground, Htuple* Background)

void RunlengthDistribution(const HObject& Region, HTuple* Foreground, HTuple* Background)

HTuple HRegion::RunlengthDistribution(HTuple* Background) const

static void HOperatorSet.RunlengthDistribution(HObject region, out HTuple foreground, out HTuple background)

HTuple HRegion.RunlengthDistribution(out HTuple background)

def runlength_distribution(region: HObject) -> Tuple[Sequence[int], Sequence[int]]

Description

The operator runlength_distributionrunlength_distributionRunlengthDistributionRunlengthDistributionRunlengthDistributionrunlength_distribution calculates the distribution of the runs of a region of the fore- and background. The frequency of the occurrence of a certain length is calculated. Runs of infinite length are not counted. Therefore the background are the holes of the region. As many values are passed as set by the maximum length of fore- or background, respectively. The length of both tuples usually differs. The first entry of the tuples is always 0 (no runs of the length 0). If there are no blanks the empty tuple is passed at BackgroundBackgroundBackgroundBackgroundbackgroundbackground. Analogously the empty tuple is passed in case of an empty region at ForegroundForegroundForegroundForegroundforegroundforeground.

Execution Information

Parameters

RegionRegionRegionRegionregionregion (input_object)  region objectHRegionHObjectHRegionHobject

Region to be examined.

ForegroundForegroundForegroundForegroundforegroundforeground (output_control)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Length distribution of the region (foreground).

BackgroundBackgroundBackgroundBackgroundbackgroundbackground (output_control)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Length distribution of the background.

Complexity

If n is the number of runs of the region the runtime complexity is O(n).

Result

The operator runlength_distributionrunlength_distributionRunlengthDistributionRunlengthDistributionRunlengthDistributionrunlength_distribution returns the value TRUE if the input is not empty. The behavior in case of empty input (no input regions available) is set via the operator set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If more than one region is passed an exception is raised.

Possible Predecessors

thresholdthresholdThresholdThresholdThresholdthreshold, select_objselect_objSelectObjSelectObjSelectObjselect_obj

Alternatives

runlength_featuresrunlength_featuresRunlengthFeaturesRunlengthFeaturesRunlengthFeaturesrunlength_features

See also

runlength_featuresrunlength_featuresRunlengthFeaturesRunlengthFeaturesRunlengthFeaturesrunlength_features

Module

Foundation