#include "tensorstore/index_interval.h"
OptionallyImplicitIndexInterval
tensorstore::IntersectPreferringExplicit(
    
OptionallyImplicitIndexInterval a,
    
OptionallyImplicitIndexInterval b);

Intersects two index intervals, preferring explicit bounds when implicit flags mismatch.

Returns the larger of the lower bounds and the smaller of the upper bounds. If the lower/upper bound is explicit in either a or b, then the lower/upper bound of the result is explicit.

The normal intersection behavior applies if both bounds are either implicit or explicit, but an explicit bound always overrides an implicit bound.

Parameters:
OptionallyImplicitIndexInterval a

OptionallyImplicitIndexInterval to intersect.

OptionallyImplicitIndexInterval b

Other OptionallyImplicitIndexInterval to intersect.