Maximal distance between two boundary points of a region.
The operator max_distance calculates the maximal distance between two boundary points of a region. The coordinates of these two extremes and the distance between them will be returned.
If the region is empty, the results of Row1,Column1, Row2 and Column2 (all of them = 0) may lead to confusion.
Regions (input_object) |
region(-array) -> object |
Regions to be examined. |
Row1 (output_control) |
rectangle.origin.y(-array) -> integer |
Row index of the first extreme point. |
Column1 (output_control) |
rectangle.origin.x(-array) -> integer |
Column index of the first extreme point. |
Row2 (output_control) |
rectangle.corner.y(-array) -> integer |
Row index of the second extreme point. |
Column2 (output_control) |
rectangle.corner.x(-array) -> integer |
Column index of the second extreme point. |
Distance (output_control) |
number(-array) -> real |
Distance of the two extreme points. |
If F is the area of a region, the runtime complexity amounts to O(sqrt(F)) on average.
The operator max_distance returns the value TRUE, if the input is not empty. The reaction to empty input (no input regions are available) may be determined with the help of the operator set_system(::'no_object_result',<Result>:). The reaction concerning an empty region (region is the empty set) will be determined by the operator set_system(::'empty_region_result',<Result>:). If necessary an exception is raised.
threshold__, regiongrowing__, connection, fetch_chord