sup

Returns the minimum/supremum point of the intervals. Both values are undefined for empty regions.

  1. auto min(R region)
  2. auto sup(R region)
    sup
    (
    R
    )
    ()
    if (
    is(R : Region!Args,
    Args...
    )
    )

Throws

MismatchingTagsException if tags differ. EmptyRegionException if region is empty.

Examples

1 alias R = Region!(int, int);
2 alias TI = R.TaggedInterval;
3 
4 R emptyRegion;
5 auto region1 = R([TI(0, 0, 10), TI(0, 20, 30)]);
6 auto region2 = R([TI(0, 0, 10), TI(1, 0, 10)]);
7 
8 assert(min(region1) == 0);
9 assert(sup(region1) == 30);
10 assertThrown!EmptyRegionException(min(emptyRegion));
11 assertThrown!EmptyRegionException(sup(emptyRegion));
12 assertThrown!(MismatchingTagsException!int)(min(region2));
13 assertThrown!(MismatchingTagsException!int)(sup(region2));

Meta