Reference: Set-Like Objects¶

Point¶

class namedisl.Point(_obj: Point, space: Space)[source]¶
space: Space¶
is_void¶
static zero_on_domain(other: BasicSet | Set | BasicMap | Map) Point[source]¶
static zero(space: Space) Point[source]¶
classmethod from_dict(space: Space, value_dict: Mapping[str, int | Val])[source]¶
get_coordinate(name: str)[source]¶
with_coordinate(name: str, value: Val | int)[source]¶
as_set() Set[source]¶
__str__()[source]¶

Return str(self).

__repr__() str[source]¶

Return repr(self).

Quasiconvex set¶

class namedisl.BasicSet(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]¶
add_constraint(cns: Constraint, /) BasicSet[source]¶
var_affs¶

Returns a lazily-evaluated mapping from dimension names (or zero) to PwAffs.

Note

Lazy evaluation means you do not pay for the creation of unused dimensions.

as_set() Set[source]¶
constraints()[source]¶
is_bounded() bool[source]¶
params()[source]¶
sample_point()[source]¶
is_empty() bool[source]¶
plain_is_empty() bool[source]¶
plain_is_universe() bool[source]¶
classmethod universe(space: Space) Self[source]¶
classmethod empty(space: Space) Self[source]¶
universe_like_me() Self[source]¶
empty_like_me() Self[source]¶
fix_dim(name: str, value: Val | int) Self[source]¶
eliminate(names: Collection[str], *, cache: Cache | None = None) Self[source]¶

Keeps the dimensions, but eliminates constraints.

project_out(names: str | Collection[str], *, cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints.

project_out_except(names_to_keep: Collection[str], *, dim_type: DimType | Literal['all'], cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints within dim_type except the ones named.

gist(context: Self) Self[source]¶
remove_divs() Self[source]¶
compute_divs() Self[source]¶
__and__(other: Self) Self[source]¶
__or__(other: Self) Self[source]¶

Return self|value.

__sub__(other: Self) Self[source]¶
equals(other: Self) bool[source]¶
__lt__(other: Self) bool[source]¶

Return self<value.

__le__(other: Self) bool[source]¶

Return self<=value.

space: Space¶
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.out})¶
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]¶
move_dims(names: Collection[str], dest_dt: DimType) Self[source]¶
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]¶
as_isl() IslObjectT_co[source]¶
involves_dims(names: Collection[str]) bool[source]¶

True if self involves any of the given dimensions.

__hash__() int[source]¶

Return hash(self).

__eq__(other: object) bool[source]¶

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]¶

Return str(self).

__repr__() str[source]¶

Return repr(self).

namedisl.make_basic_set(src: str, ctx: Context | None = None) BasicSet[source]¶
namedisl.make_basic_set(src: BasicSet) BasicSet

General set¶

class namedisl.Set(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]¶
complement() Set[source]¶
simple_hull()[source]¶
convex_hull() BasicSet[source]¶
basic_sets() list[BasicSet][source]¶
dim_max(name: str, *, cache: Cache | None = None) PwAff[source]¶
dim_min(name: str, *, cache: Cache | None = None) PwAff[source]¶
stride_info(name: str, *, cache: Cache | None = None)[source]¶
card(*, cache: Cache | None = None) PwQPolynomial[source]¶

Available if the underlying islpy was built with barvinok. (But do note the license implications.)

var_affs¶

Returns a lazily-evaluated mapping from dimension names (or zero) to Affs.

Note

Lazy evaluation means you do not pay for the creation of unused dimensions.

var_pw_affs¶

Returns a lazily-evaluated mapping from dimension names (or zero) to PwAffs.

Note

Lazy evaluation means you do not pay for the creation of unused dimensions.

as_map(in_names: Collection[str]) Map[source]¶
as_basic() BasicSet[source]¶

Will only succeed if self consists of a single piece. Try coalesce() if not.

is_bounded() bool[source]¶
params()[source]¶
sample_point()[source]¶
equate_dims(names: Sequence[tuple[str, str]]) Self[source]¶
as_pw_multi_aff() PwMultiAff[source]¶
remove_redundancies()[source]¶
coalesce() Self[source]¶
make_disjoint() Self[source]¶
is_empty() bool[source]¶
plain_is_empty() bool[source]¶
plain_is_universe() bool[source]¶
classmethod universe(space: Space) Self[source]¶
classmethod empty(space: Space) Self[source]¶
universe_like_me() Self[source]¶
empty_like_me() Self[source]¶
fix_dim(name: str, value: Val | int) Self[source]¶
eliminate(names: Collection[str], *, cache: Cache | None = None) Self[source]¶

Keeps the dimensions, but eliminates constraints.

project_out(names: str | Collection[str], *, cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints.

project_out_except(names_to_keep: Collection[str], *, dim_type: DimType | Literal['all'], cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints within dim_type except the ones named.

gist(context: Self) Self[source]¶
remove_divs() Self[source]¶
compute_divs() Self[source]¶
__and__(other: Self) Self[source]¶
__or__(other: Self) Self[source]¶

Return self|value.

__sub__(other: Self) Self[source]¶
equals(other: Self) bool[source]¶
__lt__(other: Self) bool[source]¶

Return self<value.

__le__(other: Self) bool[source]¶

Return self<=value.

space: Space¶
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.out})¶
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]¶
move_dims(names: Collection[str], dest_dt: DimType) Self[source]¶
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]¶
as_isl() IslObjectT_co[source]¶
involves_dims(names: Collection[str]) bool[source]¶

True if self involves any of the given dimensions.

__hash__() int[source]¶

Return hash(self).

__eq__(other: object) bool[source]¶

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]¶

Return str(self).

__repr__() str[source]¶

Return repr(self).

namedisl.make_set(src: str, ctx: Context | None = None) Set[source]¶
namedisl.make_set(src: Set) Set
class namedisl.StrideInfo(_obj: StrideInfo)[source]¶
stride¶
offset¶

Quasiconvex map¶

class namedisl.BasicMap(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]¶
domain() BasicSet[source]¶
range() BasicSet[source]¶
intersect_domain(domain: BasicSet) Self[source]¶
intersect_range(range: BasicSet) Self[source]¶
constraints()[source]¶
as_map() Map[source]¶
reverse() Self[source]¶
is_empty() bool[source]¶
plain_is_empty() bool[source]¶
plain_is_universe() bool[source]¶
classmethod universe(space: Space) Self[source]¶
classmethod empty(space: Space) Self[source]¶
universe_like_me() Self[source]¶
empty_like_me() Self[source]¶
fix_dim(name: str, value: Val | int) Self[source]¶
eliminate(names: Collection[str], *, cache: Cache | None = None) Self[source]¶

Keeps the dimensions, but eliminates constraints.

project_out(names: str | Collection[str], *, cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints.

project_out_except(names_to_keep: Collection[str], *, dim_type: DimType | Literal['all'], cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints within dim_type except the ones named.

gist(context: Self) Self[source]¶
remove_divs() Self[source]¶
compute_divs() Self[source]¶
__and__(other: Self) Self[source]¶
__or__(other: Self) Self[source]¶

Return self|value.

__sub__(other: Self) Self[source]¶
equals(other: Self) bool[source]¶
__lt__(other: Self) bool[source]¶

Return self<value.

__le__(other: Self) bool[source]¶

Return self<=value.

space: Space¶
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_, DimType.out})¶
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]¶
move_dims(names: Collection[str], dest_dt: DimType) Self[source]¶
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]¶
as_isl() IslObjectT_co[source]¶
involves_dims(names: Collection[str]) bool[source]¶

True if self involves any of the given dimensions.

__hash__() int[source]¶

Return hash(self).

__eq__(other: object) bool[source]¶

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]¶

Return str(self).

__repr__() str[source]¶

Return repr(self).

namedisl.make_basic_map(src: str, ctx: Context | None = None) BasicMap[source]¶
namedisl.make_basic_map(src: BasicMap) BasicMap

General map¶

class namedisl.Map(_obj: IslObjectT_co, space: Space, _isl_names_ok: bool = False)[source]¶
is_bijective()[source]¶
complement() Map[source]¶
simple_hull()[source]¶
convex_hull() BasicMap[source]¶
basic_maps() list[BasicMap][source]¶
domain() Set[source]¶
range() Set[source]¶
intersect_domain(domain: Set) Self[source]¶
intersect_range(range: Set) Self[source]¶
apply_range(other: Self) Self[source]¶
apply_domain(other: Self) Self[source]¶
as_basic() BasicMap[source]¶

Will only succeed if self consists of a single piece. Try coalesce() if not.

as_set() Set[source]¶
domain_var_pw_affs¶

Returns a lazily-evaluated mapping from dimension names (or zero) to PwAffs for the domain variables of self

Note

Lazy evaluation means you do not pay for the creation of unused dimensions.

range_var_pw_affs¶

Returns a lazily-evaluated mapping from dimension names (or zero) to PwAffs for the domain variables of self

Note

Lazy evaluation means you do not pay for the creation of unused dimensions.

reverse() Self[source]¶
equate_dims(names: Sequence[tuple[str, str]]) Self[source]¶
as_pw_multi_aff() PwMultiAff[source]¶
remove_redundancies()[source]¶
coalesce() Self[source]¶
make_disjoint() Self[source]¶
is_empty() bool[source]¶
plain_is_empty() bool[source]¶
plain_is_universe() bool[source]¶
classmethod universe(space: Space) Self[source]¶
classmethod empty(space: Space) Self[source]¶
universe_like_me() Self[source]¶
empty_like_me() Self[source]¶
fix_dim(name: str, value: Val | int) Self[source]¶
eliminate(names: Collection[str], *, cache: Cache | None = None) Self[source]¶

Keeps the dimensions, but eliminates constraints.

project_out(names: str | Collection[str], *, cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints.

project_out_except(names_to_keep: Collection[str], *, dim_type: DimType | Literal['all'], cache: Cache | None = None) Self[source]¶

Eliminates the dimensions and constraints within dim_type except the ones named.

gist(context: Self) Self[source]¶
remove_divs() Self[source]¶
compute_divs() Self[source]¶
__and__(other: Self) Self[source]¶
__or__(other: Self) Self[source]¶

Return self|value.

__sub__(other: Self) Self[source]¶
equals(other: Self) bool[source]¶
__lt__(other: Self) bool[source]¶

Return self<value.

__le__(other: Self) bool[source]¶

Return self<=value.

space: Space¶
active_dim_types: ClassVar[frozenset[DimType]] = frozenset({DimType.param, DimType.in_, DimType.out})¶
add_dims(dt: DimType, names_to_add: Collection[str], /) Self[source]¶
move_dims(names: Collection[str], dest_dt: DimType) Self[source]¶
rename_dims(renaming: Iterable[tuple[str, str]]) Self[source]¶
as_isl() IslObjectT_co[source]¶
involves_dims(names: Collection[str]) bool[source]¶

True if self involves any of the given dimensions.

__hash__() int[source]¶

Return hash(self).

__eq__(other: object) bool[source]¶

This is intended to be cheap and strict, suitable mainly for hashing. Some subclasses (e.g. namedisl.Set) may provide a different, ‘mathematically exact’ notion of equality as a different method that is more expensive to check for.

__str__() str[source]¶

Return str(self).

__repr__() str[source]¶

Return repr(self).

namedisl.make_map(src: str, ctx: Context | None = None) Map[source]¶
namedisl.make_map(src: Map) Map