-
#include "tensorstore/index_space/index_domain.h"
-
Result<IndexDomain<>>
tensorstore::ConstrainIndexDomain(IndexDomainView<> a,
IndexDomainView<> b); Constrains index domain
a
byb
.If both
a
andb
are null, returns a null index domain.If exactly one of
a
andb
is non-null, returns the non-null domain.Otherwise,
a
andb
must be compatible:For all dimension
i
for which!a.labels()[i].empty() && !b.labels()[i].empty()
,a.labels[i] == b.labels[i]
.
In the resulting domain, if a bound in
a
is both implicit and infinite, then the bound fromb
is used, otherwise the bound ofa
is used.