Reference guide

General Remarks

Creation via Static Methods

To map more directly to the isl’s C interface, object creation in islpy is done through static methods instead of through constructors. These are marked ‘(static)’ in each class’s overview section.

Documented vs. Non-documented Functionality

Since islpy is automatically generated from the isl C headers, some of the functionality it exposes might be undocumented. Undocumented functionality might change or vanish without notice. ‘Documented’ functionality is defined as whatever is mentioned in the isl manual. islpy will let you call undocumented functions, but you are doing so at your own risk.

Invalidation of Arguments

You may notice that a few methods below say ‘(becomes invalid)’. This has to do with an idiosyncrasy in isl’s interface that was retained at the Python level for efficiency. Such arguments will be deleted (by isl) upon entry to the called function. If you would like to retain access to that object, simply append a .copy() to that argument. (Note that you will notice if an object got deleted for you accidentally, as the next operation on it will simply fail with an exception.)

Integers

Whenever an integer argument is required, islpy supports regular Python integers, Python long integers, and gmpy integers. It will return gmpy integers.

Automatic Casts

islpy will automatically perform the following upward casts in argument lists:

Called with Argument Type
BasicSet Set
BasicMap Map
Set UnionSet
Map UnionMap
Space LocalSpace
Aff PwAff

as well as casts contained in the transitive closure of this ‘casting graph’.

Symbolic Constants

class islpy.format
C = 4
EXT_POLYLIB = 6
ISL = 0
LATEX = 5
OMEGA = 3
POLYLIB = 1
POLYLIB_CONSTRAINTS = 2
class islpy.error
abort = islpy._isl.error.abort
internal = islpy._isl.error.internal
invalid = islpy._isl.error.invalid
none = islpy._isl.error.none
unknown = islpy._isl.error.unknown
unsupported = islpy._isl.error.unsupported
class islpy.dim_type
all = islpy._isl.dim_type.all
cst = islpy._isl.dim_type.cst
div = islpy._isl.dim_type.div
in_ = islpy._isl.dim_type.in_
out = islpy._isl.dim_type.out
param = islpy._isl.dim_type.param
set = islpy._isl.dim_type.set
class islpy.fold
list = islpy._isl.fold.list
max = islpy._isl.fold.max
min = islpy._isl.fold.min
class islpy.constants
BOUND_BERNSTEIN = 0
BOUND_RANGE = 1
ON_ERROR_ABORT = 2
ON_ERROR_CONTINUE = 1
ON_ERROR_WARN = 0
SCHEDULE_ALGORITHM_FEAUTRIER = 1
SCHEDULE_ALGORITHM_ISL = 0

Basic Building Blocks

Context

class islpy.Context

Space

(formerly called Dim. A compatibility alias is in place.)

class islpy.Space
add_dims(self, type, n)
Parameters:
Returns:

Space

align_params(self, dim2)
Parameters:
Returns:

Space

alloc(ctx, nparam, n_in, n_out)
Parameters:
  • ctxContext
  • nparamunsigned
  • n_inunsigned
  • n_outunsigned
Returns:

Space

can_curry(self)
Parameters:selfSpace
Returns:int
can_zip(self)
Parameters:selfSpace
Returns:int
compatible(self, dim2)
Parameters:
Returns:

int

copy(self)
Parameters:selfSpace
Returns:Space
static create_from_names(ctx, set=None, in_=None, out=None, params=[])

Create a Space from lists of variable names.

Parameters:
  • set_` – names of set-type variables.
  • in_` – names of in-type variables.
  • out` – names of out-type variables.
  • params` – names of parameter-type variables.
curry(self)
Parameters:selfSpace
Returns:Space
dim(self, type)
Parameters:
Returns:

unsigned

domain(self)
Parameters:selfSpace
Returns:Space
domain_product(self, right)
Parameters:
Returns:

Space

drop_dims(self, type, first, num)
Parameters:
  • selfSpace
  • typedim_type
  • firstunsigned
  • numunsigned
Returns:

Space

drop_inputs(self, first, n)
Parameters:
  • selfSpace
  • firstunsigned
  • nunsigned
Returns:

Space

drop_outputs(self, first, n)
Parameters:
  • selfSpace
  • firstunsigned
  • nunsigned
Returns:

Space

extend(self, nparam, n_in, n_out)
Parameters:
  • selfSpace
  • nparamunsigned
  • n_inunsigned
  • n_outunsigned
Returns:

Space

find_dim_by_id(self, type, id)
Parameters:
Returns:

int

find_dim_by_name(self, type, name)
Parameters:
Returns:

int

from_domain(self)
Parameters:selfSpace
Returns:Space
from_range(self)
Parameters:selfSpace
Returns:Space
get_ctx(self)
Parameters:selfSpace
Returns:Context
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_div(self, pos)
Parameters:
Returns:

Aff

get_space(self)
Parameters:selfLocalSpace
Returns:Space
get_tuple_id(self, type)
Parameters:
Returns:

Id

get_tuple_name(self, type)
Parameters:
Returns:

string

get_var_dict(dimtype=None)

Return a dictionary mapping variable names to tuples of (dim_type, index).

Parameters:dimtype – None to get all variables, otherwise one of dim_type.
has_dim_id(self, type, pos)
Parameters:
Returns:

bool

has_dim_name(self, type, pos)
Parameters:
Returns:

bool

has_tuple_id(self, type)
Parameters:
Returns:

bool

has_tuple_name(self, type)
Parameters:
Returns:

bool

insert_dims(self, type, pos, n)
Parameters:
  • selfSpace
  • typedim_type
  • posunsigned
  • nunsigned
Returns:

Space

intersect(self, ls2)
Parameters:
Returns:

LocalSpace

is_equal(self, dim2)
Parameters:
Returns:

bool

is_params(self)
Parameters:selfSpace
Returns:bool
is_set(self)
Parameters:selfSpace
Returns:bool
is_valid()

Return whether current object is still valid.

is_wrapping(self)
Parameters:selfSpace
Returns:bool
join(self, right)
Parameters:
Returns:

Space

lifting(self)
Parameters:selfLocalSpace
Returns:BasicMap
map_from_domain_and_range(self, range)
Parameters:
Returns:

Space

map_from_set(self)
Parameters:selfSpace
Returns:Space
match(self, dim1_type, dim2, dim2_type)
Parameters:
Returns:

int

move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
  • selfSpace
  • dst_typedim_type
  • dst_posunsigned
  • src_typedim_type
  • src_posunsigned
  • nunsigned
Returns:

Space

params(self)
Parameters:selfSpace
Returns:Space
params_alloc(ctx, nparam)
Parameters:
  • ctxContext
  • nparamunsigned
Returns:

Space

product(self, right)
Parameters:
Returns:

Space

range(self)
Parameters:selfSpace
Returns:Space
range_product(self, right)
Parameters:
Returns:

Space

reset_tuple_id(self, type)
Parameters:
Returns:

Space

reverse(self)
Parameters:selfSpace
Returns:Space
set_alloc(ctx, nparam, dim)
Parameters:
  • ctxContext
  • nparamunsigned
  • dimunsigned
Returns:

Space

set_dim_id(self, type, pos, id)
Parameters:
Returns:

Space

set_dim_name(self, type, pos, name)
Parameters:
  • selfSpace
  • typedim_type
  • posunsigned
  • name – string
Returns:

Space

set_from_params(self)
Parameters:selfSpace
Returns:Space
set_tuple_id(self, type, id)
Parameters:
Returns:

Space

set_tuple_name(self, type, s)
Parameters:
Returns:

Space

tuple_match(self, dim1_type, dim2, dim2_type)
Parameters:
Returns:

int

unwrap(self)
Parameters:selfSpace
Returns:Space
wrap(self)
Parameters:selfSpace
Returns:Space
zip(self)
Parameters:selfSpace
Returns:Space

Local Space

class islpy.LocalSpace
add_dims(self, type, n)
Parameters:
Returns:

LocalSpace

copy(self)
Parameters:selfLocalSpace
Returns:LocalSpace
dim(self, type)
Parameters:
Returns:

int

domain(self)
Parameters:selfLocalSpace
Returns:LocalSpace
drop_dims(self, type, first, n)
Parameters:
Returns:

LocalSpace

from_domain(self)
Parameters:selfLocalSpace
Returns:LocalSpace
from_space(dim)
Parameters:dimSpace
Returns:LocalSpace
get_ctx(self)
Parameters:selfLocalSpace
Returns:Context
get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_div(self, pos)
Parameters:
Returns:

Aff

get_space(self)
Parameters:selfLocalSpace
Returns:Space
has_dim_name(self, type, pos)
Parameters:
Returns:

bool

insert_dims(self, type, first, n)
Parameters:
Returns:

LocalSpace

intersect(self, ls2)
Parameters:
Returns:

LocalSpace

is_equal(self, ls2)
Parameters:
Returns:

bool

is_set(self)
Parameters:selfLocalSpace
Returns:bool
is_valid()

Return whether current object is still valid.

lifting(self)
Parameters:selfLocalSpace
Returns:BasicMap
range(self)
Parameters:selfLocalSpace
Returns:LocalSpace
set_dim_id(self, type, pos, id)
Parameters:
Returns:

LocalSpace

set_dim_name(self, type, pos, s)
Parameters:
Returns:

LocalSpace

space

get_space(self)

Parameters:selfLocalSpace
Returns:Space

Constraints

class islpy.Constraint
static eq_from_names(space, coefficients={})

Create a constraint const + coeff_1*var_1 +... == 0.

Parameters:
  • spaceSpace
  • coefficients – a dict or iterable of tuple instances mapping variable names to their coefficients The constant is set to the value of the key ‘1’.

Changed in version 2011.3: Eliminated the separate const parameter.

equality_alloc(ls)
Parameters:lsLocalSpace
Returns:Constraint
equality_from_aff(aff)
Parameters:affAff
Returns:Constraint
get_aff(self)
Parameters:selfConstraint
Returns:Aff
get_bound(self, type, pos)
Parameters:
Returns:

Aff

get_coefficient(self, type, pos)
Parameters:
Returns:

v (integer)

get_coefficients_by_name(dimtype=None, dim_to_name=None)

Return a dictionary mapping variable names to coefficients.

Parameters:dimtype – None to get all variables, otherwise one of dim_type.

Changed in version 2011.3: New for Aff

get_constant(self)
Parameters:selfConstraint
Returns:v (integer)
get_ctx(self)
Parameters:selfConstraint
Returns:Context
get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_div(self, pos)
Parameters:
Returns:

Aff

get_local_space(self)
Parameters:selfConstraint
Returns:LocalSpace
get_space(self)
Parameters:selfConstraint
Returns:Space
static ineq_from_names(space, coefficients={})

Create a constraint const + coeff_1*var_1 +... >= 0.

Parameters:
  • spaceSpace
  • coefficients – a dict or iterable of tuple instances mapping variable names to their coefficients The constant is set to the value of the key ‘1’.

Changed in version 2011.3: Eliminated the separate const parameter.

inequality_alloc(ls)
Parameters:lsLocalSpace
Returns:Constraint
inequality_from_aff(aff)
Parameters:affAff
Returns:Constraint
involves_dims(self, type, first, n)
Parameters:
Returns:

int

is_div_constraint(self)
Parameters:selfConstraint
Returns:bool
is_equality(self)
Parameters:selfConstraint
Returns:bool
is_lower_bound(self, type, pos)
Parameters:
Returns:

bool

is_upper_bound(self, type, pos)
Parameters:
Returns:

bool

is_valid()

Return whether current object is still valid.

set_coefficient(self, type, pos, v)
Parameters:
Returns:

Constraint

set_coefficients(dim_tp, args)
Parameters:
  • dim_tpdim_type
  • argslist of coefficients, for indices 0..len(args)-1.

Changed in version 2011.3: New for Aff

set_coefficients_by_name(iterable, name_to_dim=None)

Set the coefficients and the constant.

Parameters:iterable – a dict or iterable of tuple instances mapping variable names to their coefficients. The constant is set to the value of the key ‘1’.

Changed in version 2011.3: New for Aff

set_constant(self, v)
Parameters:
Returns:

Constraint

space

get_space(self)

Parameters:selfConstraint
Returns:Space

Vector

class islpy.Vec
add(self, vec2)
Parameters:
Returns:

Vec

alloc(ctx, size)
Parameters:
  • ctxContext
  • sizeunsigned
Returns:

Vec

clr(self)
Parameters:selfVec
Returns:Vec
copy(self)
Parameters:selfVec
Returns:Vec
drop_els(self, pos, n)
Parameters:
  • selfVec
  • posunsigned
  • nunsigned
Returns:

Vec

extend(self, size)
Parameters:
  • selfVec
  • sizeunsigned
Returns:

Vec

get_ctx(self)
Parameters:selfVec
Returns:Context
get_element(self, pos)
Parameters:
  • selfVec
  • posint
Returns:

v (integer)

insert_els(self, pos, n)
Parameters:
  • selfVec
  • posunsigned
  • nunsigned
Returns:

Vec

insert_zero_els(self, pos, n)
Parameters:
  • selfVec
  • posunsigned
  • nunsigned
Returns:

Vec

is_equal(self, vec2)
Parameters:
Returns:

bool

is_valid()

Return whether current object is still valid.

neg(self)
Parameters:selfVec
Returns:Vec
read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

Vec

scale(self, m)
Parameters:
  • selfVec
  • m – integer
Returns:

Vec

set(self, v)
Parameters:
  • selfVec
  • v – integer
Returns:

Vec

set_element(self, pos, v)
Parameters:
  • selfVec
  • posint
  • v – integer
Returns:

Vec

sort(self)
Parameters:selfVec
Returns:Vec
zero_extend(self, size)
Parameters:
  • selfVec
  • sizeunsigned
Returns:

Vec

Matrix

class islpy.Mat
add_rows(self, n)
Parameters:
  • selfMat
  • nunsigned
Returns:

Mat

add_zero_cols(self, n)
Parameters:
  • selfMat
  • nunsigned
Returns:

Mat

add_zero_rows(self, n)
Parameters:
  • selfMat
  • nunsigned
Returns:

Mat

alloc(ctx, n_row, n_col)
Parameters:
  • ctxContext
  • n_rowunsigned
  • n_colunsigned
Returns:

Mat

col_add(self, dst_col, src_col)
Parameters:
  • selfMat
  • dst_colint
  • src_colint
Returns:

None

cols(self)
Parameters:selfMat
Returns:int
concat(self, bot)
Parameters:
Returns:

Mat

copy(self)
Parameters:selfMat
Returns:Mat
diagonal(self, mat2)
Parameters:
Returns:

Mat

from_row_vec(vec)
Parameters:vecVec
Returns:Mat
get_ctx(self)
Parameters:selfMat
Returns:Context
get_element(self, row, col)
Parameters:
  • selfMat
  • rowint
  • colint
Returns:

v (integer)

initial_non_zero_cols(self)
Parameters:selfMat
Returns:int
insert_cols(self, col, n)
Parameters:
  • selfMat
  • colunsigned
  • nunsigned
Returns:

Mat

insert_rows(self, row, n)
Parameters:
  • selfMat
  • rowunsigned
  • nunsigned
Returns:

Mat

insert_zero_cols(self, first, n)
Parameters:
  • selfMat
  • firstunsigned
  • nunsigned
Returns:

Mat

insert_zero_rows(self, row, n)
Parameters:
  • selfMat
  • rowunsigned
  • nunsigned
Returns:

Mat

is_equal(self, mat2)
Parameters:
Returns:

bool

is_valid()

Return whether current object is still valid.

move_cols(self, dst_col, src_col, n)
Parameters:
  • selfMat
  • dst_colunsigned
  • src_colunsigned
  • nunsigned
Returns:

Mat

normalize(self)
Parameters:selfMat
Returns:Mat
normalize_row(self, row)
Parameters:
  • selfMat
  • rowint
Returns:

Mat

print_internal(self, out, indent)
Parameters:
  • selfMat
  • outfile-like
  • indentint
Returns:

None

right_inverse(self)
Parameters:selfMat
Returns:Mat
right_kernel(self)
Parameters:selfMat
Returns:Mat
rows(self)
Parameters:selfMat
Returns:int
scale_down_row(self, row, m)
Parameters:
  • selfMat
  • rowint
  • m – integer
Returns:

Mat

set_element(self, row, col, v)
Parameters:
  • selfMat
  • rowint
  • colint
  • v – integer
Returns:

Mat

vec_concat(self, bot)
Parameters:
Returns:

Mat

vec_inverse_product(self, vec)
Parameters:
Returns:

Vec

Sets and Maps

Basic Set

class islpy.BasicSet(s, context=None)
add(self, type, n)
Parameters:
Returns:

BasicSet

add_basic_set(self, bset)
Parameters:
Returns:

Set

add_constraint(self, constraint)
Parameters:
Returns:

BasicSet

add_constraints(obj, constraints)

New in version 2011.3.

add_dims(self, type, n)
Parameters:
Returns:

Set

add_set(self, set)
Parameters:
Returns:

UnionSet

affine_hull(self)
Parameters:selfBasicSet
Returns:BasicSet
align_divs(self)
Parameters:selfSet
Returns:Set
align_params(self, model)
Parameters:
Returns:

Set

apply(self, bmap)
Parameters:
Returns:

BasicSet

apply_pw_qpolynomial_fold(self, pwf)
Parameters:
Returns:

tuple: (PwQPolynomialFold, tight (integer))

apply_union_pw_qpolynomial_fold(self, upwf)
Parameters:
Returns:

tuple: (UnionPwQPolynomialFold, tight (integer))

box_from_points(pnt1, pnt2)
Parameters:
Returns:

BasicSet

coalesce(self)
Parameters:selfSet
Returns:Set
coefficients(self)
Parameters:selfBasicSet
Returns:BasicSet
complement(self)
Parameters:selfSet
Returns:Set
compute_divs(self)
Parameters:selfSet
Returns:Set
compute_schedule(self, validity, proximity)
Parameters:
Returns:

Schedule

compute_vertices(self)
Parameters:selfBasicSet
Returns:Vertices
contains(self, dim)
Parameters:
Returns:

int

convex_hull(self)
Parameters:selfSet
Returns:BasicSet
copy(self)
Parameters:selfBasicSet
Returns:BasicSet
count(self)
Parameters:selfSet
Returns:count (integer)
count_upto(self, max)
Parameters:
Returns:

count (integer)

detect_equalities(self)
Parameters:selfBasicSet
Returns:BasicSet
dim(self, type)
Parameters:
Returns:

unsigned

dim_has_lower_bound(self, type, pos)
Parameters:
Returns:

int

dim_has_upper_bound(self, type, pos)
Parameters:
Returns:

int

dim_is_bounded(self, type, pos)
Parameters:
Returns:

int

dim_max(self, pos)
Parameters:
  • selfSet
  • posint
Returns:

PwAff

dim_min(self, pos)
Parameters:
  • selfSet
  • posint
Returns:

PwAff

drop_constraint(self, constraint)
Parameters:
Returns:

BasicSet

eliminate(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

eliminate_except(obj, names, types)
Parameters:
  • types – list of dim_type determining the types of axes to eliminate
  • names – names of axes matching the above which should be left alone by the eliminate

New in version 2011.3.

empty(dim)
Parameters:dimSpace
Returns:BasicSet
equalities_matrix(self, c1, c2, c3, c4)
Parameters:
Returns:

Mat

equate(self, type1, pos1, type2, pos2)
Parameters:
Returns:

Set

extract_set(self, dim)
Parameters:
Returns:

Set

fast_dim_is_fixed(self, dim)
Parameters:
  • selfSet
  • dimunsigned
Returns:

val (integer)

fast_is_disjoint(self, set2)
Parameters:
Returns:

int

fast_is_empty(self)
Parameters:selfBasicSet
Returns:int
fast_is_equal(self, set2)
Parameters:
Returns:

int

fast_is_universe(self)
Parameters:selfSet
Returns:int
find_dim_by_id(self, type, id)
Parameters:
Returns:

int

find_dim_by_name(self, type, name)
Parameters:
Returns:

int

fix(self, type, pos, value)
Parameters:
Returns:

BasicSet

flat_product(self, bset2)
Parameters:
Returns:

BasicSet

flatten(self)
Parameters:selfBasicSet
Returns:BasicSet
flatten_map(self)
Parameters:selfSet
Returns:Map
follows_at(self, set2, pos)
Parameters:
  • selfSet
  • set2Set
  • posint
Returns:

int

foreach_basic_set(self)
Parameters:
  • selfSet
  • fn – callback(bset)
Returns:

int

foreach_bound_pair(self, type, pos)
Parameters:
  • selfBasicSet
  • typedim_type
  • posunsigned
  • fn – callback(lower, upper, bset)
Returns:

int

foreach_constraint(self)
Parameters:
Returns:

int

foreach_point(self)
Parameters:
  • selfSet
  • fn – callback(pnt)
Returns:

int

foreach_set(self)
Parameters:
  • selfUnionSet
  • fn – callback(set)
Returns:

int

from_constraint_matrices(dim, eq, ineq, c1, c2, c3, c4)
Parameters:
Returns:

BasicSet

from_params(self)
Parameters:selfSet
Returns:Set
from_point(pnt)
Parameters:pntPoint
Returns:BasicSet
get_basic_sets(basic_instance, *args, **kwargs)

Get the list of BasicSet instances in this Set.

get_constraints()

Get a list of constraints.

get_ctx(self)
Parameters:selfBasicSet
Returns:Context
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_div(self, pos)
Parameters:
Returns:

Aff

get_local_space(self)
Parameters:selfBasicSet
Returns:LocalSpace
get_space(self)
Parameters:selfBasicSet
Returns:Space
get_tuple_id(self)
Parameters:selfSet
Returns:Id
get_tuple_name(self)
Parameters:selfBasicSet
Returns:string
gist(self, context)
Parameters:
Returns:

BasicSet

gist_basic_set(self, context)
Parameters:
Returns:

Set

gist_params(self, context)
Parameters:
  • selfSet
  • contextSet
Returns:

Set

has_dim_id(self, type, pos)
Parameters:
Returns:

bool

has_dim_name(self, type, pos)
Parameters:
Returns:

bool

has_equal_space(self, set2)
Parameters:
Returns:

bool

has_tuple_id(self)
Parameters:selfSet
Returns:bool
has_tuple_name(self)
Parameters:selfSet
Returns:bool
identity(self)
Parameters:selfSet
Returns:Map
indicator_function(self)
Parameters:selfSet
Returns:PwAff
inequalities_matrix(self, c1, c2, c3, c4)
Parameters:
Returns:

Mat

insert_dims(self, type, pos, n)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • nunsigned
Returns:

Set

intersect(self, bset2)
Parameters:
Returns:

BasicSet

intersect_params(self, bset2)
Parameters:
Returns:

BasicSet

involves_dims(self, type, first, n)
Parameters:
Returns:

int

is_bounded(self)
Parameters:selfBasicSet
Returns:bool
is_box(self)
Parameters:selfSet
Returns:bool
is_empty(self)
Parameters:selfBasicSet
Returns:bool
is_equal(self, set2)
Parameters:
Returns:

bool

is_params(self)
Parameters:selfSet
Returns:bool
is_rational(self)
Parameters:selfBasicSet
Returns:bool
is_singleton(self)
Parameters:selfSet
Returns:bool
is_strict_subset(self, set2)
Parameters:
Returns:

bool

is_subset(self, bset2)
Parameters:
Returns:

bool

is_universe(self)
Parameters:selfBasicSet
Returns:bool
is_valid()

Return whether current object is still valid.

is_wrapping(self)
Parameters:selfBasicSet
Returns:bool
lex_ge_set(self, set2)
Parameters:
Returns:

Map

lex_ge_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_gt_set(self, set2)
Parameters:
Returns:

Map

lex_gt_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_le_set(self, set2)
Parameters:
Returns:

Map

lex_le_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_lt_set(self, set2)
Parameters:
Returns:

Map

lex_lt_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lexmax(self)
Parameters:selfBasicSet
Returns:Set
lexmin(self)
Parameters:selfBasicSet
Returns:Set
lift(self)
Parameters:selfBasicSet
Returns:BasicSet
lifting(self)
Parameters:selfSet
Returns:Map
lower_bound(self, type, pos, value)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • value – integer
Returns:

Set

make_disjoint(self)
Parameters:selfSet
Returns:Set
move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
  • selfBasicSet
  • dst_typedim_type
  • dst_posunsigned
  • src_typedim_type
  • src_posunsigned
  • nunsigned
Returns:

BasicSet

n_basic_set(self)
Parameters:selfSet
Returns:int
n_constraint(self)
Parameters:selfBasicSet
Returns:int
n_dim(self)
Parameters:selfBasicSet
Returns:unsigned
n_param(self)
Parameters:selfBasicSet
Returns:unsigned
n_set(self)
Parameters:selfUnionSet
Returns:int
nat_universe(dim)
Parameters:dimSpace
Returns:BasicSet
neg(self)
Parameters:selfBasicSet
Returns:BasicSet
params(self)
Parameters:selfBasicSet
Returns:BasicSet
partial_lexmax(self, dom)
Parameters:
Returns:

tuple: (Set, empty (Set))

partial_lexmax_pw_multi_aff(self, dom)
Parameters:
Returns:

tuple: (PwMultiAff, empty (Set))

partial_lexmin(self, dom)
Parameters:
Returns:

tuple: (Set, empty (Set))

partial_lexmin_pw_multi_aff(self, dom)
Parameters:
Returns:

tuple: (PwMultiAff, empty (Set))

plain_dim_has_fixed_lower_bound(self, dim)
Parameters:
  • selfSet
  • dimunsigned
Returns:

val (integer)

plain_dim_is_fixed(self, dim)
Parameters:
Returns:

val (integer)

plain_is_disjoint(self, set2)
Parameters:
Returns:

int

plain_is_empty(self)
Parameters:selfBasicSet
Returns:int
plain_is_equal(self, set2)
Parameters:
Returns:

int

plain_is_fixed(self, type, pos)
Parameters:
Returns:

val (integer)

plain_is_universe(self)
Parameters:selfSet
Returns:int
polyhedral_hull(self)
Parameters:selfSet
Returns:BasicSet
positive_orthant(space)
Parameters:spaceSpace
Returns:BasicSet
print_(self, out, indent, prefix, suffix, output_format)
Parameters:
  • selfBasicSet
  • outfile-like
  • indentint
  • prefix – string
  • suffix – string
  • output_formatunsigned
Returns:

None

print_internal(self, out, indent)
Parameters:
  • selfBasicSet
  • outfile-like
  • indentint
Returns:

None

product(self, set2)
Parameters:
Returns:

Set

project_out(self, type, first, n)
Parameters:
Returns:

BasicSet

project_out_except(obj, names, types)
Parameters:
  • types – list of dim_type determining the types of axes to project out
  • names – names of axes matching the above which should be left alone by the projection

New in version 2011.3.

read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

BasicSet

read_from_str(ctx, str)
Parameters:
Returns:

BasicSet

recession_cone(self)
Parameters:selfSet
Returns:Set
reduced_basis(self)
Parameters:selfBasicSet
Returns:Mat
remove_dims(self, type, first, n)
Parameters:
Returns:

BasicSet

remove_divs(self)
Parameters:selfBasicSet
Returns:BasicSet
remove_divs_involving_dims(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

remove_redundancies(self)
Parameters:selfBasicSet
Returns:BasicSet
remove_unknown_divs(self)
Parameters:selfSet
Returns:Set
reset_space(self, dim)
Parameters:
Returns:

Set

reset_tuple_id(self)
Parameters:selfSet
Returns:Set
sample(self)
Parameters:selfBasicSet
Returns:BasicSet
sample_point(self)
Parameters:selfBasicSet
Returns:Point
set_dim_id(self, type, pos, id)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • idId
Returns:

Set

set_dim_name(self, type, pos, s)
Parameters:
Returns:

BasicSet

set_tuple_id(self, id)
Parameters:
  • selfSet
  • idId
Returns:

Set

set_tuple_name(self, s)
Parameters:
Returns:

BasicSet

simple_hull(self)
Parameters:selfSet
Returns:BasicSet
solutions(self)
Parameters:selfBasicSet
Returns:BasicSet
space

get_space(self)

Parameters:selfBasicSet
Returns:Space
split_dims(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

subtract(self, set2)
Parameters:
Returns:

Set

sum(self, set2)
Parameters:
Returns:

Set

to_str(self)
Parameters:selfSet
Returns:string
union(self, bset2)
Parameters:
Returns:

Set

universe(dim)
Parameters:dimSpace
Returns:BasicSet
universe_like(self)
Parameters:selfSet
Returns:Set
universe_like_set(model)
Parameters:modelSet
Returns:BasicSet
unwrap(self)
Parameters:selfBasicSet
Returns:BasicMap
upper_bound(self, type, pos, value)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • value – integer
Returns:

Set

Basic Map

class islpy.BasicMap(s, context=None)
add(self, type, n)
Parameters:
Returns:

BasicMap

add_basic_map(self, bmap)
Parameters:
Returns:

Map

add_constraint(self, constraint)
Parameters:
Returns:

BasicMap

add_constraints(obj, constraints)

New in version 2011.3.

add_dims(self, type, n)
Parameters:
Returns:

Map

add_map(self, map)
Parameters:
Returns:

UnionMap

affine_hull(self)
Parameters:selfBasicMap
Returns:BasicMap
align_divs(self)
Parameters:selfMap
Returns:Map
align_params(self, model)
Parameters:
Returns:

Map

apply_domain(self, bmap2)
Parameters:
Returns:

BasicMap

apply_pw_qpolynomial_fold(self, pwf)
Parameters:
Returns:

tuple: (PwQPolynomialFold, tight (integer))

apply_range(self, bmap2)
Parameters:
Returns:

BasicMap

apply_union_pw_qpolynomial_fold(self, upwf)
Parameters:
Returns:

tuple: (UnionPwQPolynomialFold, tight (integer))

can_curry(self)
Parameters:selfBasicMap
Returns:int
can_zip(self)
Parameters:selfBasicMap
Returns:int
coalesce(self)
Parameters:selfMap
Returns:Map
complement(self)
Parameters:selfMap
Returns:Map
compute_divs(self)
Parameters:selfBasicMap
Returns:Map
compute_flow(self, must_source, may_source, schedule)
Parameters:
Returns:

tuple: (must_dep (UnionMap), may_dep (UnionMap), must_no_source (UnionMap), may_no_source (UnionMap))

contains(self, dim)
Parameters:
Returns:

int

convex_hull(self)
Parameters:selfMap
Returns:BasicMap
copy(self)
Parameters:selfBasicMap
Returns:BasicMap
curry(self)
Parameters:selfBasicMap
Returns:BasicMap
deltas(self)
Parameters:selfBasicMap
Returns:BasicSet
deltas_map(self)
Parameters:selfBasicMap
Returns:BasicMap
detect_equalities(self)
Parameters:selfBasicMap
Returns:BasicMap
dim(self, type)
Parameters:
Returns:

unsigned

dim_max(self, pos)
Parameters:
  • selfMap
  • posint
Returns:

PwAff

domain(self)
Parameters:selfBasicMap
Returns:BasicSet
domain_map(self)
Parameters:selfBasicMap
Returns:BasicMap
domain_product(self, bmap2)
Parameters:
Returns:

BasicMap

drop_basic_map(self, bmap)
Parameters:
Returns:

Map

eliminate(self, type, first, n)
Parameters:
Returns:

BasicMap

empty(dim)
Parameters:dimSpace
Returns:BasicMap
equal(dim, n_equal)
Parameters:
  • dimSpace
  • n_equalunsigned
Returns:

BasicMap

equalities_matrix(self, c1, c2, c3, c4, c5)
Parameters:
Returns:

Mat

equate(self, type1, pos1, type2, pos2)
Parameters:
Returns:

BasicMap

extract_map(self, dim)
Parameters:
Returns:

Map

fast_is_empty(self)
Parameters:selfBasicMap
Returns:int
fast_is_equal(self, map2)
Parameters:
Returns:

int

fast_is_fixed(self, type, pos)
Parameters:
Returns:

val (integer)

find_dim_by_id(self, type, id)
Parameters:
Returns:

int

find_dim_by_name(self, type, name)
Parameters:
Returns:

int

fixed_power(self, exp)
Parameters:
  • selfMap
  • exp – integer
Returns:

Map

flat_domain_product(self, map2)
Parameters:
Returns:

Map

flat_product(self, bmap2)
Parameters:
Returns:

BasicMap

flat_range_product(self, bmap2)
Parameters:
Returns:

BasicMap

flatten(self)
Parameters:selfBasicMap
Returns:BasicMap
flatten_domain(self)
Parameters:selfBasicMap
Returns:BasicMap
flatten_range(self)
Parameters:selfBasicMap
Returns:BasicMap
foreach_basic_map(self)
Parameters:
  • selfMap
  • fn – callback(bmap)
Returns:

int

foreach_constraint(self)
Parameters:
Returns:

int

foreach_map(self)
Parameters:
  • selfUnionMap
  • fn – callback(map)
Returns:

int

from_aff(aff)
Parameters:affAff
Returns:BasicMap
from_aff_list(domain_dim, list)
Parameters:
Returns:

BasicMap

from_basic_set(bset, dim)
Parameters:
Returns:

BasicMap

from_constraint(constraint)
Parameters:constraintConstraint
Returns:BasicMap
from_constraint_matrices(dim, eq, ineq, c1, c2, c3, c4, c5)
Parameters:
Returns:

BasicMap

from_domain(bset)
Parameters:bsetBasicSet
Returns:BasicMap
from_domain_and_range(domain, range)
Parameters:
Returns:

BasicMap

from_multi_aff(maff)
Parameters:maffMultiAff
Returns:BasicMap
from_qpolynomial(qp)
Parameters:qpQPolynomial
Returns:BasicMap
from_range(bset)
Parameters:bsetBasicSet
Returns:BasicMap
get_basic_maps(basic_instance, *args, **kwargs)

Get the list of BasicMap instances in this Map.

get_constraints()

Get a list of constraints.

get_ctx(self)
Parameters:selfBasicMap
Returns:Context
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_div(self, pos)
Parameters:
Returns:

Aff

get_local_space(self)
Parameters:selfBasicMap
Returns:LocalSpace
get_space(self)
Parameters:selfBasicMap
Returns:Space
get_tuple_id(self, type)
Parameters:
Returns:

Id

get_tuple_name(self, type)
Parameters:
Returns:

string

gist(self, context)
Parameters:
Returns:

BasicMap

gist_basic_map(self, context)
Parameters:
Returns:

Map

gist_domain(self, context)
Parameters:
  • selfMap
  • contextSet
Returns:

Map

gist_params(self, context)
Parameters:
  • selfMap
  • contextSet
Returns:

Map

gist_range(self, context)
Parameters:
  • selfMap
  • contextSet
Returns:

Map

has_defining_equality(self, type, pos)
Parameters:
Returns:

c (Constraint)

has_dim_id(self, type, pos)
Parameters:
Returns:

bool

has_equal_space(self, map2)
Parameters:
Returns:

bool

has_tuple_id(self, type)
Parameters:
Returns:

bool

identity(dim)
Parameters:dimSpace
Returns:BasicMap
image_is_bounded(self)
Parameters:selfBasicMap
Returns:int
inequalities_matrix(self, c1, c2, c3, c4, c5)
Parameters:
Returns:

Mat

insert_dims(self, type, pos, n)
Parameters:
  • selfMap
  • typedim_type
  • posunsigned
  • nunsigned
Returns:

Map

intersect(self, bmap2)
Parameters:
Returns:

BasicMap

intersect_domain(self, bset)
Parameters:
Returns:

BasicMap

intersect_params(self, params)
Parameters:
Returns:

Map

intersect_range(self, bset)
Parameters:
Returns:

BasicMap

involves_dims(self, type, first, n)
Parameters:
Returns:

int

is_bijective(self)
Parameters:selfMap
Returns:bool
is_empty(self)
Parameters:selfBasicMap
Returns:bool
is_equal(self, bmap2)
Parameters:
Returns:

bool

is_injective(self)
Parameters:selfMap
Returns:bool
is_rational(self)
Parameters:selfBasicMap
Returns:bool
is_single_valued(self)
Parameters:selfBasicMap
Returns:bool
is_strict_subset(self, bmap2)
Parameters:
Returns:

bool

is_subset(self, bmap2)
Parameters:
Returns:

bool

is_translation(self)
Parameters:selfMap
Returns:bool
is_universe(self)
Parameters:selfBasicMap
Returns:bool
is_valid()

Return whether current object is still valid.

less_at(dim, pos)
Parameters:
  • dimSpace
  • posunsigned
Returns:

BasicMap

lex_ge_map(self, map2)
Parameters:
Returns:

Map

lex_ge_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_gt_map(self, map2)
Parameters:
Returns:

Map

lex_gt_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_le_map(self, map2)
Parameters:
Returns:

Map

lex_le_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_lt_map(self, map2)
Parameters:
Returns:

Map

lex_lt_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lexmax(self)
Parameters:selfBasicMap
Returns:Map
lexmin(self)
Parameters:selfBasicMap
Returns:Map
lexmin_pw_multi_aff(self)
Parameters:selfBasicMap
Returns:PwMultiAff
make_disjoint(self)
Parameters:selfMap
Returns:Map
more_at(dim, pos)
Parameters:
  • dimSpace
  • posunsigned
Returns:

BasicMap

move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
  • selfBasicMap
  • dst_typedim_type
  • dst_posunsigned
  • src_typedim_type
  • src_posunsigned
  • nunsigned
Returns:

BasicMap

n_map(self)
Parameters:selfUnionMap
Returns:int
nat_universe(dim)
Parameters:dimSpace
Returns:BasicMap
oppose(self, type1, pos1, type2, pos2)
Parameters:
Returns:

Map

order_gt(self, type1, pos1, type2, pos2)
Parameters:
Returns:

Map

params(self)
Parameters:selfMap
Returns:Set
partial_lexmax(self, dom)
Parameters:
Returns:

tuple: (Map, empty (Set))

partial_lexmax_pw_multi_aff(self, dom)
Parameters:
Returns:

tuple: (PwMultiAff, empty (Set))

partial_lexmin(self, dom)
Parameters:
Returns:

tuple: (Map, empty (Set))

partial_lexmin_pw_multi_aff(self, dom)
Parameters:
Returns:

tuple: (PwMultiAff, empty (Set))

plain_input_is_fixed(self, in)
Parameters:
  • selfMap
  • inunsigned
Returns:

val (integer)

plain_is_empty(self)
Parameters:selfBasicMap
Returns:int
plain_is_equal(self, map2)
Parameters:
Returns:

int

plain_is_fixed(self, type, pos)
Parameters:
Returns:

val (integer)

plain_is_injective(self)
Parameters:selfMap
Returns:int
plain_is_single_valued(self)
Parameters:selfMap
Returns:int
plain_is_universe(self)
Parameters:selfMap
Returns:int
polyhedral_hull(self)
Parameters:selfMap
Returns:BasicMap
power(self)
Parameters:selfMap
Returns:tuple: (Map, exact (integer))
print_(self, out, indent, prefix, suffix, output_format)
Parameters:
  • selfBasicMap
  • outfile-like
  • indentint
  • prefix – string
  • suffix – string
  • output_formatunsigned
Returns:

None

print_internal(self, out, indent)
Parameters:
  • selfBasicMap
  • outfile-like
  • indentint
Returns:

None

product(self, map2)
Parameters:
Returns:

Map

project_out(self, type, first, n)
Parameters:
Returns:

BasicMap

project_out_except(obj, names, types)
Parameters:
  • types – list of dim_type determining the types of axes to project out
  • names – names of axes matching the above which should be left alone by the projection

New in version 2011.3.

range(self)
Parameters:selfBasicMap
Returns:BasicSet
range_map(self)
Parameters:selfBasicMap
Returns:BasicMap
range_product(self, bmap2)
Parameters:
Returns:

BasicMap

reaching_path_lengths(self)
Parameters:selfMap
Returns:tuple: (Map, exact (integer))
read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

BasicMap

read_from_str(ctx, str)
Parameters:
Returns:

BasicMap

remove_dims(self, type, first, n)
Parameters:
Returns:

BasicMap

remove_divs(self)
Parameters:selfBasicMap
Returns:BasicMap
remove_redundancies(self)
Parameters:selfBasicMap
Returns:BasicMap
reset_tuple_id(self, type)
Parameters:
Returns:

Map

reverse(self)
Parameters:selfBasicMap
Returns:BasicMap
sample(self)
Parameters:selfBasicMap
Returns:BasicMap
set_dim_id(self, type, pos, id)
Parameters:
  • selfMap
  • typedim_type
  • posunsigned
  • idId
Returns:

Map

set_dim_name(self, type, pos, s)
Parameters:
Returns:

BasicMap

set_tuple_id(self, type, id)
Parameters:
Returns:

Map

set_tuple_name(self, type, s)
Parameters:
Returns:

BasicMap

simple_hull(self)
Parameters:selfMap
Returns:BasicMap
space

get_space(self)

Parameters:selfBasicMap
Returns:Space
subtract(self, map2)
Parameters:
Returns:

Map

subtract_domain(self, dom)
Parameters:
Returns:

Map

subtract_range(self, dom)
Parameters:
Returns:

Map

transitive_closure(self)
Parameters:selfMap
Returns:tuple: (Map, exact (integer))
union(self, bmap2)
Parameters:
Returns:

Map

universe(dim)
Parameters:dimSpace
Returns:BasicMap
universe_like(self)
Parameters:selfBasicMap
Returns:BasicMap
wrap(self)
Parameters:selfBasicMap
Returns:BasicSet
zip(self)
Parameters:selfBasicMap
Returns:BasicMap

Set

class islpy.Set(s, context=None)
add_basic_set(self, bset)
Parameters:
Returns:

Set

add_constraint(self, constraint)
Parameters:
Returns:

Set

add_constraints(obj, constraints)

New in version 2011.3.

add_dims(self, type, n)
Parameters:
Returns:

Set

add_set(self, set)
Parameters:
Returns:

UnionSet

affine_hull(self)
Parameters:selfSet
Returns:BasicSet
align_divs(self)
Parameters:selfSet
Returns:Set
align_params(self, model)
Parameters:
Returns:

Set

apply(self, map)
Parameters:
Returns:

Set

apply_pw_qpolynomial_fold(self, pwf)
Parameters:
Returns:

tuple: (PwQPolynomialFold, tight (integer))

apply_union_pw_qpolynomial_fold(self, upwf)
Parameters:
Returns:

tuple: (UnionPwQPolynomialFold, tight (integer))

box_from_points(pnt1, pnt2)
Parameters:
Returns:

Set

coalesce(self)
Parameters:selfSet
Returns:Set
coefficients(self)
Parameters:selfSet
Returns:BasicSet
complement(self)
Parameters:selfSet
Returns:Set
compute_divs(self)
Parameters:selfSet
Returns:Set
compute_schedule(self, validity, proximity)
Parameters:
Returns:

Schedule

contains(self, dim)
Parameters:
Returns:

int

convex_hull(self)
Parameters:selfSet
Returns:BasicSet
copy(self)
Parameters:selfSet
Returns:Set
count(self)
Parameters:selfSet
Returns:count (integer)
count_upto(self, max)
Parameters:
  • selfSet
  • max – integer
Returns:

count (integer)

detect_equalities(self)
Parameters:selfSet
Returns:Set
dim(self, type)
Parameters:
Returns:

unsigned

dim_has_lower_bound(self, type, pos)
Parameters:
Returns:

int

dim_has_upper_bound(self, type, pos)
Parameters:
Returns:

int

dim_is_bounded(self, type, pos)
Parameters:
Returns:

int

dim_max(self, pos)
Parameters:
  • selfSet
  • posint
Returns:

PwAff

dim_min(self, pos)
Parameters:
  • selfSet
  • posint
Returns:

PwAff

eliminate(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

eliminate_except(obj, names, types)
Parameters:
  • types – list of dim_type determining the types of axes to eliminate
  • names – names of axes matching the above which should be left alone by the eliminate

New in version 2011.3.

empty(dim)
Parameters:dimSpace
Returns:Set
equate(self, type1, pos1, type2, pos2)
Parameters:
Returns:

Set

extract_set(self, dim)
Parameters:
Returns:

Set

fast_dim_is_fixed(self, dim)
Parameters:
  • selfSet
  • dimunsigned
Returns:

val (integer)

fast_is_disjoint(self, set2)
Parameters:
Returns:

int

fast_is_empty(self)
Parameters:selfSet
Returns:int
fast_is_equal(self, set2)
Parameters:
Returns:

int

fast_is_universe(self)
Parameters:selfSet
Returns:int
find_dim_by_id(self, type, id)
Parameters:
Returns:

int

find_dim_by_name(self, type, name)
Parameters:
Returns:

int

fix(self, type, pos, value)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • value – integer
Returns:

Set

flat_product(self, set2)
Parameters:
Returns:

Set

flatten(self)
Parameters:selfSet
Returns:Set
flatten_map(self)
Parameters:selfSet
Returns:Map
follows_at(self, set2, pos)
Parameters:
  • selfSet
  • set2Set
  • posint
Returns:

int

foreach_basic_set(self)
Parameters:
  • selfSet
  • fn – callback(bset)
Returns:

int

foreach_point(self)
Parameters:
  • selfSet
  • fn – callback(pnt)
Returns:

int

foreach_set(self)
Parameters:
  • selfUnionSet
  • fn – callback(set)
Returns:

int

from_basic_set(bset)
Parameters:bsetBasicSet
Returns:Set
from_params(self)
Parameters:selfSet
Returns:Set
from_point(pnt)
Parameters:pntPoint
Returns:Set
from_pw_aff(pwaff)
Parameters:pwaffPwAff
Returns:Set
from_pw_multi_aff(pma)
Parameters:pmaPwMultiAff
Returns:Set
from_union_set(uset)
Parameters:usetUnionSet
Returns:Set
get_basic_sets()

Get the list of BasicSet instances in this Set.

get_ctx(self)
Parameters:selfSet
Returns:Context
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_space(self)
Parameters:selfSet
Returns:Space
get_tuple_id(self)
Parameters:selfSet
Returns:Id
get_tuple_name(self)
Parameters:selfSet
Returns:string
gist(self, context)
Parameters:
  • selfSet
  • contextSet
Returns:

Set

gist_basic_set(self, context)
Parameters:
Returns:

Set

gist_params(self, context)
Parameters:
  • selfSet
  • contextSet
Returns:

Set

has_dim_id(self, type, pos)
Parameters:
Returns:

bool

has_dim_name(self, type, pos)
Parameters:
Returns:

bool

has_equal_space(self, set2)
Parameters:
Returns:

bool

has_tuple_id(self)
Parameters:selfSet
Returns:bool
has_tuple_name(self)
Parameters:selfSet
Returns:bool
identity(self)
Parameters:selfSet
Returns:Map
indicator_function(self)
Parameters:selfSet
Returns:PwAff
insert_dims(self, type, pos, n)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • nunsigned
Returns:

Set

intersect(self, set2)
Parameters:
Returns:

Set

intersect_params(self, params)
Parameters:
Returns:

Set

involves_dims(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

int

is_bounded(self)
Parameters:selfSet
Returns:bool
is_box(self)
Parameters:selfSet
Returns:bool
is_empty(self)
Parameters:selfSet
Returns:bool
is_equal(self, set2)
Parameters:
Returns:

bool

is_params(self)
Parameters:selfSet
Returns:bool
is_singleton(self)
Parameters:selfSet
Returns:bool
is_strict_subset(self, set2)
Parameters:
Returns:

bool

is_subset(self, set2)
Parameters:
Returns:

bool

is_valid()

Return whether current object is still valid.

is_wrapping(self)
Parameters:selfSet
Returns:bool
lex_ge_set(self, set2)
Parameters:
Returns:

Map

lex_ge_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_gt_set(self, set2)
Parameters:
Returns:

Map

lex_gt_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_le_set(self, set2)
Parameters:
Returns:

Map

lex_le_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_lt_set(self, set2)
Parameters:
Returns:

Map

lex_lt_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lexmax(self)
Parameters:selfSet
Returns:Set
lexmin(self)
Parameters:selfSet
Returns:Set
lift(self)
Parameters:selfSet
Returns:Set
lifting(self)
Parameters:selfSet
Returns:Map
lower_bound(self, type, pos, value)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • value – integer
Returns:

Set

make_disjoint(self)
Parameters:selfSet
Returns:Set
move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
  • selfSet
  • dst_typedim_type
  • dst_posunsigned
  • src_typedim_type
  • src_posunsigned
  • nunsigned
Returns:

Set

n_basic_set(self)
Parameters:selfSet
Returns:int
n_dim(self)
Parameters:selfSet
Returns:unsigned
n_param(self)
Parameters:selfSet
Returns:unsigned
n_set(self)
Parameters:selfUnionSet
Returns:int
nat_universe(dim)
Parameters:dimSpace
Returns:Set
neg(self)
Parameters:selfSet
Returns:Set
params(self)
Parameters:selfSet
Returns:Set
partial_lexmax(self, dom)
Parameters:
Returns:

tuple: (Set, empty (Set))

partial_lexmin(self, dom)
Parameters:
Returns:

tuple: (Set, empty (Set))

plain_dim_has_fixed_lower_bound(self, dim)
Parameters:
  • selfSet
  • dimunsigned
Returns:

val (integer)

plain_dim_is_fixed(self, dim)
Parameters:
  • selfSet
  • dimunsigned
Returns:

val (integer)

plain_is_disjoint(self, set2)
Parameters:
Returns:

int

plain_is_empty(self)
Parameters:selfSet
Returns:int
plain_is_equal(self, set2)
Parameters:
Returns:

int

plain_is_fixed(self, type, pos)
Parameters:
Returns:

val (integer)

plain_is_universe(self)
Parameters:selfSet
Returns:int
polyhedral_hull(self)
Parameters:selfSet
Returns:BasicSet
print_(self, out, indent, output_format)
Parameters:
  • selfSet
  • outfile-like
  • indentint
  • output_formatunsigned
Returns:

None

print_internal(self, out, indent)
Parameters:
  • selfSet
  • outfile-like
  • indentint
Returns:

None

product(self, set2)
Parameters:
Returns:

Set

project_out(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

project_out_except(obj, names, types)
Parameters:
  • types – list of dim_type determining the types of axes to project out
  • names – names of axes matching the above which should be left alone by the projection

New in version 2011.3.

read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

Set

read_from_str(ctx, str)
Parameters:
Returns:

Set

recession_cone(self)
Parameters:selfSet
Returns:Set
remove_dims(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

remove_divs(self)
Parameters:selfSet
Returns:Set
remove_divs_involving_dims(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

remove_redundancies(self)
Parameters:selfSet
Returns:Set
remove_unknown_divs(self)
Parameters:selfSet
Returns:Set
reset_space(self, dim)
Parameters:
Returns:

Set

reset_tuple_id(self)
Parameters:selfSet
Returns:Set
sample(self)
Parameters:selfSet
Returns:BasicSet
sample_point(self)
Parameters:selfSet
Returns:Point
set_dim_id(self, type, pos, id)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • idId
Returns:

Set

set_dim_name(self, type, pos, s)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • s – string
Returns:

Set

set_tuple_id(self, id)
Parameters:
  • selfSet
  • idId
Returns:

Set

set_tuple_name(self, s)
Parameters:
  • selfSet
  • s – string
Returns:

Set

simple_hull(self)
Parameters:selfSet
Returns:BasicSet
solutions(self)
Parameters:selfSet
Returns:BasicSet
space

get_space(self)

Parameters:selfSet
Returns:Space
split_dims(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

subtract(self, set2)
Parameters:
Returns:

Set

sum(self, set2)
Parameters:
Returns:

Set

to_str(self)
Parameters:selfSet
Returns:string
union(self, set2)
Parameters:
Returns:

Set

universe(dim)
Parameters:dimSpace
Returns:Set
universe_like(self)
Parameters:selfSet
Returns:Set
unwrap(self)
Parameters:selfSet
Returns:Map
upper_bound(self, type, pos, value)
Parameters:
  • selfSet
  • typedim_type
  • posunsigned
  • value – integer
Returns:

Set

Map

class islpy.Map(s, context=None)
add_basic_map(self, bmap)
Parameters:
Returns:

Map

add_constraint(self, constraint)
Parameters:
Returns:

Map

add_constraints(obj, constraints)

New in version 2011.3.

add_dims(self, type, n)
Parameters:
Returns:

Map

add_map(self, map)
Parameters:
Returns:

UnionMap

affine_hull(self)
Parameters:selfMap
Returns:BasicMap
align_divs(self)
Parameters:selfMap
Returns:Map
align_params(self, model)
Parameters:
Returns:

Map

apply_domain(self, map2)
Parameters:
Returns:

Map

apply_pw_qpolynomial_fold(self, pwf)
Parameters:
Returns:

tuple: (PwQPolynomialFold, tight (integer))

apply_range(self, map2)
Parameters:
Returns:

Map

apply_union_pw_qpolynomial_fold(self, upwf)
Parameters:
Returns:

tuple: (UnionPwQPolynomialFold, tight (integer))

can_curry(self)
Parameters:selfMap
Returns:int
can_zip(self)
Parameters:selfMap
Returns:int
coalesce(self)
Parameters:selfMap
Returns:Map
complement(self)
Parameters:selfMap
Returns:Map
compute_divs(self)
Parameters:selfMap
Returns:Map
compute_flow(self, must_source, may_source, schedule)
Parameters:
Returns:

tuple: (must_dep (UnionMap), may_dep (UnionMap), must_no_source (UnionMap), may_no_source (UnionMap))

contains(self, dim)
Parameters:
Returns:

int

convex_hull(self)
Parameters:selfMap
Returns:BasicMap
copy(self)
Parameters:selfMap
Returns:Map
curry(self)
Parameters:selfMap
Returns:Map
deltas(self)
Parameters:selfMap
Returns:Set
deltas_map(self)
Parameters:selfMap
Returns:Map
detect_equalities(self)
Parameters:selfMap
Returns:Map
dim(self, type)
Parameters:
Returns:

unsigned

dim_max(self, pos)
Parameters:
  • selfMap
  • posint
Returns:

PwAff

domain(self)
Parameters:selfMap
Returns:Set
domain_map(self)
Parameters:selfMap
Returns:Map
domain_product(self, map2)
Parameters:
Returns:

Map

drop_basic_map(self, bmap)
Parameters:
Returns:

Map

eliminate(self, type, first, n)
Parameters:
  • selfMap
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Map

empty(dim)
Parameters:dimSpace
Returns:Map
equate(self, type1, pos1, type2, pos2)
Parameters:
Returns:

Map

extract_map(self, dim)
Parameters:
Returns:

Map

fast_is_empty(self)
Parameters:selfMap
Returns:int
fast_is_equal(self, map2)
Parameters:
Returns:

int

fast_is_fixed(self, type, pos)
Parameters:
Returns:

val (integer)

find_dim_by_id(self, type, id)
Parameters:
Returns:

int

find_dim_by_name(self, type, name)
Parameters:
Returns:

int

fixed_power(self, exp)
Parameters:
  • selfMap
  • exp – integer
Returns:

Map

flat_domain_product(self, map2)
Parameters:
Returns:

Map

flat_product(self, map2)
Parameters:
Returns:

Map

flat_range_product(self, map2)
Parameters:
Returns:

Map

flatten(self)
Parameters:selfMap
Returns:Map
flatten_domain(self)
Parameters:selfMap
Returns:Map
flatten_range(self)
Parameters:selfMap
Returns:Map
foreach_basic_map(self)
Parameters:
  • selfMap
  • fn – callback(bmap)
Returns:

int

foreach_map(self)
Parameters:
  • selfUnionMap
  • fn – callback(map)
Returns:

int

from_aff(aff)
Parameters:affAff
Returns:Map
from_basic_map(bmap)
Parameters:bmapBasicMap
Returns:Map
from_domain(set)
Parameters:setSet
Returns:Map
from_domain_and_range(domain, range)
Parameters:
  • domainSet
  • rangeSet
Returns:

Map

from_multi_aff(maff)
Parameters:maffMultiAff
Returns:Map
from_pw_aff(pwaff)
Parameters:pwaffPwAff
Returns:Map
from_pw_multi_aff(pma)
Parameters:pmaPwMultiAff
Returns:Map
from_set(set, dim)
Parameters:
Returns:

Map

from_union_map(umap)
Parameters:umapUnionMap
Returns:Map
get_basic_maps()

Get the list of BasicMap instances in this Map.

get_ctx(self)
Parameters:selfMap
Returns:Context
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_space(self)
Parameters:selfMap
Returns:Space
get_tuple_id(self, type)
Parameters:
Returns:

Id

get_tuple_name(self, type)
Parameters:
Returns:

string

gist(self, context)
Parameters:
  • selfMap
  • contextMap
Returns:

Map

gist_basic_map(self, context)
Parameters:
Returns:

Map

gist_domain(self, context)
Parameters:
  • selfMap
  • contextSet
Returns:

Map

gist_params(self, context)
Parameters:
  • selfMap
  • contextSet
Returns:

Map

gist_range(self, context)
Parameters:
  • selfMap
  • contextSet
Returns:

Map

has_dim_id(self, type, pos)
Parameters:
Returns:

bool

has_equal_space(self, map2)
Parameters:
Returns:

bool

has_tuple_id(self, type)
Parameters:
Returns:

bool

identity(dim)
Parameters:dimSpace
Returns:Map
insert_dims(self, type, pos, n)
Parameters:
  • selfMap
  • typedim_type
  • posunsigned
  • nunsigned
Returns:

Map

intersect(self, map2)
Parameters:
Returns:

Map

intersect_domain(self, set)
Parameters:
Returns:

Map

intersect_params(self, params)
Parameters:
Returns:

Map

intersect_range(self, set)
Parameters:
Returns:

Map

involves_dims(self, type, first, n)
Parameters:
  • selfMap
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

int

is_bijective(self)
Parameters:selfMap
Returns:bool
is_empty(self)
Parameters:selfMap
Returns:bool
is_equal(self, map2)
Parameters:
Returns:

bool

is_injective(self)
Parameters:selfMap
Returns:bool
is_single_valued(self)
Parameters:selfMap
Returns:bool
is_strict_subset(self, map2)
Parameters:
Returns:

bool

is_subset(self, map2)
Parameters:
Returns:

bool

is_translation(self)
Parameters:selfMap
Returns:bool
is_valid()

Return whether current object is still valid.

lex_ge(set_dim)
Parameters:set_dimSpace
Returns:Map
lex_ge_first(dim, n)
Parameters:
  • dimSpace
  • nunsigned
Returns:

Map

lex_ge_map(self, map2)
Parameters:
Returns:

Map

lex_ge_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_gt(set_dim)
Parameters:set_dimSpace
Returns:Map
lex_gt_first(dim, n)
Parameters:
  • dimSpace
  • nunsigned
Returns:

Map

lex_gt_map(self, map2)
Parameters:
Returns:

Map

lex_gt_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_le(set_dim)
Parameters:set_dimSpace
Returns:Map
lex_le_first(dim, n)
Parameters:
  • dimSpace
  • nunsigned
Returns:

Map

lex_le_map(self, map2)
Parameters:
Returns:

Map

lex_le_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_lt(set_dim)
Parameters:set_dimSpace
Returns:Map
lex_lt_first(dim, n)
Parameters:
  • dimSpace
  • nunsigned
Returns:

Map

lex_lt_map(self, map2)
Parameters:
Returns:

Map

lex_lt_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lexmax(self)
Parameters:selfMap
Returns:Map
lexmin(self)
Parameters:selfMap
Returns:Map
make_disjoint(self)
Parameters:selfMap
Returns:Map
move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
  • selfMap
  • dst_typedim_type
  • dst_posunsigned
  • src_typedim_type
  • src_posunsigned
  • nunsigned
Returns:

Map

n_map(self)
Parameters:selfUnionMap
Returns:int
nat_universe(dim)
Parameters:dimSpace
Returns:Map
oppose(self, type1, pos1, type2, pos2)
Parameters:
Returns:

Map

order_gt(self, type1, pos1, type2, pos2)
Parameters:
Returns:

Map

params(self)
Parameters:selfMap
Returns:Set
partial_lexmax(self, dom)
Parameters:
Returns:

tuple: (Map, empty (Set))

partial_lexmin(self, dom)
Parameters:
Returns:

tuple: (Map, empty (Set))

plain_input_is_fixed(self, in)
Parameters:
  • selfMap
  • inunsigned
Returns:

val (integer)

plain_is_empty(self)
Parameters:selfMap
Returns:int
plain_is_equal(self, map2)
Parameters:
Returns:

int

plain_is_fixed(self, type, pos)
Parameters:
Returns:

val (integer)

plain_is_injective(self)
Parameters:selfMap
Returns:int
plain_is_single_valued(self)
Parameters:selfMap
Returns:int
plain_is_universe(self)
Parameters:selfMap
Returns:int
polyhedral_hull(self)
Parameters:selfMap
Returns:BasicMap
power(self)
Parameters:selfMap
Returns:tuple: (Map, exact (integer))
print_(self, out, indent, output_format)
Parameters:
  • selfMap
  • outfile-like
  • indentint
  • output_formatunsigned
Returns:

None

print_internal(self, out, indent)
Parameters:
  • selfMap
  • outfile-like
  • indentint
Returns:

None

product(self, map2)
Parameters:
Returns:

Map

project_out(self, type, first, n)
Parameters:
  • selfMap
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Map

project_out_except(obj, names, types)
Parameters:
  • types – list of dim_type determining the types of axes to project out
  • names – names of axes matching the above which should be left alone by the projection

New in version 2011.3.

range(self)
Parameters:selfMap
Returns:Set
range_map(self)
Parameters:selfMap
Returns:Map
range_product(self, map2)
Parameters:
Returns:

Map

reaching_path_lengths(self)
Parameters:selfMap
Returns:tuple: (Map, exact (integer))
read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

Map

read_from_str(ctx, str)
Parameters:
Returns:

Map

remove_dims(self, type, first, n)
Parameters:
  • selfMap
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Map

remove_divs(self)
Parameters:selfMap
Returns:Map
remove_redundancies(self)
Parameters:selfMap
Returns:Map
reset_tuple_id(self, type)
Parameters:
Returns:

Map

reverse(self)
Parameters:selfMap
Returns:Map
sample(self)
Parameters:selfMap
Returns:BasicMap
set_dim_id(self, type, pos, id)
Parameters:
  • selfMap
  • typedim_type
  • posunsigned
  • idId
Returns:

Map

set_dim_name(self, type, pos, s)
Parameters:
  • selfMap
  • typedim_type
  • posunsigned
  • s – string
Returns:

Map

set_tuple_id(self, type, id)
Parameters:
Returns:

Map

set_tuple_name(self, type, s)
Parameters:
Returns:

Map

simple_hull(self)
Parameters:selfMap
Returns:BasicMap
space

get_space(self)

Parameters:selfMap
Returns:Space
subtract(self, map2)
Parameters:
Returns:

Map

subtract_domain(self, dom)
Parameters:
Returns:

Map

subtract_range(self, dom)
Parameters:
Returns:

Map

transitive_closure(self)
Parameters:selfMap
Returns:tuple: (Map, exact (integer))
union(self, map2)
Parameters:
Returns:

Map

universe(dim)
Parameters:dimSpace
Returns:Map
wrap(self)
Parameters:selfMap
Returns:Set
zip(self)
Parameters:selfMap
Returns:Map

Union Set

class islpy.UnionSet(s, context=None)
add_set(self, set)
Parameters:
Returns:

UnionSet

affine_hull(self)
Parameters:selfUnionSet
Returns:UnionSet
align_params(self, model)
Parameters:
Returns:

UnionSet

apply(self, umap)
Parameters:
Returns:

UnionSet

apply_union_pw_qpolynomial_fold(self, upwf)
Parameters:
Returns:

tuple: (UnionPwQPolynomialFold, tight (integer))

coalesce(self)
Parameters:selfUnionSet
Returns:UnionSet
coefficients(self)
Parameters:selfUnionSet
Returns:UnionSet
compute_divs(self)
Parameters:selfUnionSet
Returns:UnionSet
compute_schedule(self, validity, proximity)
Parameters:
Returns:

Schedule

contains(self, dim)
Parameters:
Returns:

int

copy(self)
Parameters:selfUnionSet
Returns:UnionSet
detect_equalities(self)
Parameters:selfUnionSet
Returns:UnionSet
empty(dim)
Parameters:dimSpace
Returns:UnionSet
extract_set(self, dim)
Parameters:
Returns:

Set

foreach_point(self)
Parameters:
  • selfUnionSet
  • fn – callback(pnt)
Returns:

int

foreach_set(self)
Parameters:
  • selfUnionSet
  • fn – callback(set)
Returns:

int

from_set(set)
Parameters:setSet
Returns:UnionSet
get_ctx(self)
Parameters:selfUnionSet
Returns:Context
get_space(self)
Parameters:selfUnionSet
Returns:Space
gist(self, context)
Parameters:
Returns:

UnionSet

gist_params(self, set)
Parameters:
Returns:

UnionSet

identity(self)
Parameters:selfUnionSet
Returns:UnionMap
intersect(self, uset2)
Parameters:
Returns:

UnionSet

intersect_params(self, set)
Parameters:
Returns:

UnionSet

is_empty(self)
Parameters:selfUnionSet
Returns:bool
is_equal(self, uset2)
Parameters:
Returns:

bool

is_params(self)
Parameters:selfUnionSet
Returns:bool
is_strict_subset(self, uset2)
Parameters:
Returns:

bool

is_subset(self, uset2)
Parameters:
Returns:

bool

is_valid()

Return whether current object is still valid.

lex_ge_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_gt_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_le_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lex_lt_union_set(self, uset2)
Parameters:
Returns:

UnionMap

lexmax(self)
Parameters:selfUnionSet
Returns:UnionSet
lexmin(self)
Parameters:selfUnionSet
Returns:UnionSet
lift(self)
Parameters:selfUnionSet
Returns:UnionSet
n_set(self)
Parameters:selfUnionSet
Returns:int
params(self)
Parameters:selfUnionSet
Returns:Set
polyhedral_hull(self)
Parameters:selfUnionSet
Returns:UnionSet
product(self, uset2)
Parameters:
Returns:

UnionSet

read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

UnionSet

read_from_str(ctx, str)
Parameters:
Returns:

UnionSet

sample(self)
Parameters:selfUnionSet
Returns:BasicSet
simple_hull(self)
Parameters:selfUnionSet
Returns:UnionSet
solutions(self)
Parameters:selfUnionSet
Returns:UnionSet
space

get_space(self)

Parameters:selfUnionSet
Returns:Space
subtract(self, uset2)
Parameters:
Returns:

UnionSet

union(self, uset2)
Parameters:
Returns:

UnionSet

universe(self)
Parameters:selfUnionSet
Returns:UnionSet
unwrap(self)
Parameters:selfUnionSet
Returns:UnionMap

Union Map

class islpy.UnionMap(s, context=None)
add_map(self, map)
Parameters:
Returns:

UnionMap

affine_hull(self)
Parameters:selfUnionMap
Returns:UnionMap
align_params(self, model)
Parameters:
Returns:

UnionMap

apply_domain(self, umap2)
Parameters:
Returns:

UnionMap

apply_range(self, umap2)
Parameters:
Returns:

UnionMap

apply_union_pw_qpolynomial_fold(self, upwf)
Parameters:
Returns:

tuple: (UnionPwQPolynomialFold, tight (integer))

coalesce(self)
Parameters:selfUnionMap
Returns:UnionMap
compute_divs(self)
Parameters:selfUnionMap
Returns:UnionMap
compute_flow(self, must_source, may_source, schedule)
Parameters:
Returns:

tuple: (must_dep (UnionMap), may_dep (UnionMap), must_no_source (UnionMap), may_no_source (UnionMap))

contains(self, dim)
Parameters:
Returns:

int

copy(self)
Parameters:selfUnionMap
Returns:UnionMap
curry(self)
Parameters:selfUnionMap
Returns:UnionMap
deltas(self)
Parameters:selfUnionMap
Returns:UnionSet
deltas_map(self)
Parameters:selfUnionMap
Returns:UnionMap
detect_equalities(self)
Parameters:selfUnionMap
Returns:UnionMap
domain(self)
Parameters:selfUnionMap
Returns:UnionSet
domain_map(self)
Parameters:selfUnionMap
Returns:UnionMap
empty(dim)
Parameters:dimSpace
Returns:UnionMap
extract_map(self, dim)
Parameters:
Returns:

Map

fixed_power(self, exp)
Parameters:
Returns:

UnionMap

flat_range_product(self, umap2)
Parameters:
Returns:

UnionMap

foreach_map(self)
Parameters:
  • selfUnionMap
  • fn – callback(map)
Returns:

int

from_domain(uset)
Parameters:usetUnionSet
Returns:UnionMap
from_domain_and_range(domain, range)
Parameters:
Returns:

UnionMap

from_map(map)
Parameters:mapMap
Returns:UnionMap
from_range(uset)
Parameters:usetUnionSet
Returns:UnionMap
from_union_pw_multi_aff(upma)
Parameters:upmaUnionPwMultiAff
Returns:UnionMap
get_ctx(self)
Parameters:selfUnionMap
Returns:Context
get_space(self)
Parameters:selfUnionMap
Returns:Space
gist(self, context)
Parameters:
Returns:

UnionMap

gist_domain(self, uset)
Parameters:
Returns:

UnionMap

gist_params(self, set)
Parameters:
Returns:

UnionMap

gist_range(self, uset)
Parameters:
Returns:

UnionMap

intersect(self, umap2)
Parameters:
Returns:

UnionMap

intersect_domain(self, uset)
Parameters:
Returns:

UnionMap

intersect_params(self, set)
Parameters:
Returns:

UnionMap

intersect_range(self, uset)
Parameters:
Returns:

UnionMap

is_bijective(self)
Parameters:selfUnionMap
Returns:bool
is_empty(self)
Parameters:selfUnionMap
Returns:bool
is_equal(self, umap2)
Parameters:
Returns:

bool

is_injective(self)
Parameters:selfUnionMap
Returns:bool
is_single_valued(self)
Parameters:selfUnionMap
Returns:bool
is_strict_subset(self, umap2)
Parameters:
Returns:

bool

is_subset(self, umap2)
Parameters:
Returns:

bool

is_valid()

Return whether current object is still valid.

lex_ge_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_gt_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_le_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lex_lt_union_map(self, umap2)
Parameters:
Returns:

UnionMap

lexmax(self)
Parameters:selfUnionMap
Returns:UnionMap
lexmin(self)
Parameters:selfUnionMap
Returns:UnionMap
n_map(self)
Parameters:selfUnionMap
Returns:int
params(self)
Parameters:selfUnionMap
Returns:Set
plain_is_injective(self)
Parameters:selfUnionMap
Returns:int
polyhedral_hull(self)
Parameters:selfUnionMap
Returns:UnionMap
power(self)
Parameters:selfUnionMap
Returns:tuple: (UnionMap, exact (integer))
product(self, umap2)
Parameters:
Returns:

UnionMap

range(self)
Parameters:selfUnionMap
Returns:UnionSet
range_map(self)
Parameters:selfUnionMap
Returns:UnionMap
range_product(self, umap2)
Parameters:
Returns:

UnionMap

read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

UnionMap

read_from_str(ctx, str)
Parameters:
Returns:

UnionMap

reverse(self)
Parameters:selfUnionMap
Returns:UnionMap
sample(self)
Parameters:selfUnionMap
Returns:BasicMap
simple_hull(self)
Parameters:selfUnionMap
Returns:UnionMap
space

get_space(self)

Parameters:selfUnionMap
Returns:Space
subtract(self, umap2)
Parameters:
Returns:

UnionMap

transitive_closure(self)
Parameters:selfUnionMap
Returns:tuple: (UnionMap, exact (integer))
union(self, umap2)
Parameters:
Returns:

UnionMap

universe(self)
Parameters:selfUnionMap
Returns:UnionMap
wrap(self)
Parameters:selfUnionMap
Returns:UnionSet
zip(self)
Parameters:selfUnionMap
Returns:UnionMap

Geometric Entities

Point

class islpy.Point
copy(self)
Parameters:selfPoint
Returns:Point
get_coordinate(self, type, pos)
Parameters:
Returns:

v (integer)

get_ctx(self)
Parameters:selfPoint
Returns:Context
get_space(self)
Parameters:selfPoint
Returns:Space
is_valid()

Return whether current object is still valid.

is_void(self)
Parameters:selfPoint
Returns:bool
set_coordinate(self, type, pos, v)
Parameters:
Returns:

Point

space

get_space(self)

Parameters:selfPoint
Returns:Space
void(dim)
Parameters:dimSpace
Returns:Point
zero(dim)
Parameters:dimSpace
Returns:Point

Vertex

class islpy.Vertex
get_ctx(self)
Parameters:selfVertex
Returns:Context
get_domain(self)
Parameters:selfVertex
Returns:BasicSet
get_expr(self)
Parameters:selfVertex
Returns:BasicSet
get_id(self)
Parameters:selfVertex
Returns:int
is_valid()

Return whether current object is still valid.

Vertices

class islpy.Vertices
foreach_cell(self)
Parameters:
  • selfVertices
  • fn – callback(cell)
Returns:

int

foreach_vertex(self)
Parameters:
  • selfVertices
  • fn – callback(vertex)
Returns:

int

get_ctx(self)
Parameters:selfVertices
Returns:Context
get_n_vertices(self)
Parameters:selfVertices
Returns:int
is_valid()

Return whether current object is still valid.

Cell

class islpy.Cell
foreach_vertex(self)
Parameters:
  • selfCell
  • fn – callback(vertex)
Returns:

int

get_ctx(self)
Parameters:selfCell
Returns:Context
get_domain(self)
Parameters:selfCell
Returns:BasicSet
is_valid()

Return whether current object is still valid.

Quasi-Affine Expressions

Quasi-Affine Expression

class islpy.Aff(s, context=None)
add(self, aff2)
Parameters:
Returns:

Aff

add_coefficient(self, type, pos, v)
Parameters:
  • selfAff
  • typedim_type
  • posint
  • v – integer
Returns:

Aff

add_constant(self, v)
Parameters:
  • selfAff
  • v – integer
Returns:

Aff

add_dims(self, type, n)
Parameters:
Returns:

Aff

align_params(self, model)
Parameters:
Returns:

Aff

ceil(self)
Parameters:selfAff
Returns:Aff
coalesce(self)
Parameters:selfPwAff
Returns:PwAff
cond(self, pwaff_true, pwaff_false)
Parameters:
Returns:

PwAff

copy(self)
Parameters:selfAff
Returns:Aff
dim(self, type)
Parameters:
Returns:

int

domain(self)
Parameters:selfPwAff
Returns:Set
drop_dims(self, type, first, n)
Parameters:
  • selfAff
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Aff

eq_set(self, pwaff2)
Parameters:
Returns:

Set

floor(self)
Parameters:selfAff
Returns:Aff
foreach_piece(self)
Parameters:
  • selfPwAff
  • fn – callback(set, aff)
Returns:

int

ge_basic_set(self, aff2)
Parameters:
Returns:

BasicSet

ge_set(self, pwaff2)
Parameters:
Returns:

Set

get_aggregate_domain(basic_instance, *args, **kwargs)
Returns:a Set that is the union of the domains of all pieces
get_coefficient(self, type, pos)
Parameters:
Returns:

v (integer)

get_coefficients_by_name(dimtype=None, dim_to_name=None)

Return a dictionary mapping variable names to coefficients.

Parameters:dimtype – None to get all variables, otherwise one of dim_type.

Changed in version 2011.3: New for Aff

get_constant(self)
Parameters:selfAff
Returns:v (integer)
get_ctx(self)
Parameters:selfAff
Returns:Context
get_denominator(self)
Parameters:selfAff
Returns:v (integer)
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_div(self, pos)
Parameters:
  • selfAff
  • posint
Returns:

Aff

get_domain_local_space(self)
Parameters:selfAff
Returns:LocalSpace
get_domain_space(self)
Parameters:selfAff
Returns:Space
get_local_space(self)
Parameters:selfAff
Returns:LocalSpace
get_pieces(basic_instance, *args, **kwargs)
Returns:list of (Set, Aff)
get_space(self)
Parameters:selfAff
Returns:Space
gist(self, context)
Parameters:
  • selfAff
  • contextSet
Returns:

Aff

gist_params(self, context)
Parameters:
  • selfAff
  • contextSet
Returns:

Aff

gt_set(self, pwaff2)
Parameters:
Returns:

Set

has_dim_id(self, type, pos)
Parameters:
Returns:

bool

insert_dims(self, type, first, n)
Parameters:
  • selfAff
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Aff

intersect_domain(self, set)
Parameters:
Returns:

PwAff

intersect_params(self, set)
Parameters:
Returns:

PwAff

involves_dims(self, type, first, n)
Parameters:
  • selfAff
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

int

is_cst(self)
Parameters:selfAff
Returns:bool
is_empty(self)
Parameters:selfPwAff
Returns:bool
is_valid()

Return whether current object is still valid.

le_basic_set(self, aff2)
Parameters:
Returns:

BasicSet

le_set(self, pwaff2)
Parameters:
Returns:

Set

lt_set(self, pwaff2)
Parameters:
Returns:

Set

max(self, pwaff2)
Parameters:
Returns:

PwAff

min(self, pwaff2)
Parameters:
Returns:

PwAff

mod(self, mod)
Parameters:
  • selfAff
  • mod – integer
Returns:

Aff

mul(self, aff2)
Parameters:
Returns:

Aff

n_piece(self)
Parameters:selfPwAff
Returns:int
ne_set(self, pwaff2)
Parameters:
Returns:

Set

neg(self)
Parameters:selfAff
Returns:Aff
non_zero_set(self)
Parameters:selfPwAff
Returns:Set
nonneg_set(self)
Parameters:selfPwAff
Returns:Set
plain_is_equal(self, aff2)
Parameters:
Returns:

int

plain_is_zero(self)
Parameters:selfAff
Returns:int
project_domain_on_params(self)
Parameters:selfAff
Returns:Aff
read_from_str(ctx, str)
Parameters:
Returns:

Aff

scale(self, f)
Parameters:
  • selfAff
  • f – integer
Returns:

Aff

scale_down(self, f)
Parameters:
  • selfAff
  • f – integer
Returns:

Aff

set_coefficient(self, type, pos, v)
Parameters:
  • selfAff
  • typedim_type
  • posint
  • v – integer
Returns:

Aff

set_coefficients(dim_tp, args)
Parameters:
  • dim_tpdim_type
  • argslist of coefficients, for indices 0..len(args)-1.

Changed in version 2011.3: New for Aff

set_coefficients_by_name(iterable, name_to_dim=None)

Set the coefficients and the constant.

Parameters:iterable – a dict or iterable of tuple instances mapping variable names to their coefficients. The constant is set to the value of the key ‘1’.

Changed in version 2011.3: New for Aff

set_constant(self, v)
Parameters:
  • selfAff
  • v – integer
Returns:

Aff

set_denominator(self, v)
Parameters:
  • selfAff
  • v – integer
Returns:

Aff

set_dim_id(self, type, pos, id)
Parameters:
  • selfAff
  • typedim_type
  • posunsigned
  • idId
Returns:

Aff

set_dim_name(self, type, pos, s)
Parameters:
  • selfAff
  • typedim_type
  • posunsigned
  • s – string
Returns:

Aff

set_tuple_id(self, type, id)
Parameters:
Returns:

PwAff

space

get_space(self)

Parameters:selfAff
Returns:Space
sub(self, aff2)
Parameters:
Returns:

Aff

union_add(self, pwaff2)
Parameters:
Returns:

PwAff

union_max(self, pwaff2)
Parameters:
Returns:

PwAff

union_min(self, pwaff2)
Parameters:
Returns:

PwAff

zero_on_domain(ls)
Parameters:lsLocalSpace
Returns:Aff
zero_set(self)
Parameters:selfPwAff
Returns:Set

Piecewise Quasi-Affine Expression

class islpy.PwAff(s, context=None)
add(self, pwaff2)
Parameters:
Returns:

PwAff

add_dims(self, type, n)
Parameters:
Returns:

PwAff

align_params(self, model)
Parameters:
Returns:

PwAff

alloc(set, aff)
Parameters:
Returns:

PwAff

ceil(self)
Parameters:selfPwAff
Returns:PwAff
coalesce(self)
Parameters:selfPwAff
Returns:PwAff
cond(self, pwaff_true, pwaff_false)
Parameters:
Returns:

PwAff

copy(self)
Parameters:selfPwAff
Returns:PwAff
dim(self, type)
Parameters:
Returns:

unsigned

domain(self)
Parameters:selfPwAff
Returns:Set
drop_dims(self, type, first, n)
Parameters:
  • selfPwAff
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

PwAff

empty(dim)
Parameters:dimSpace
Returns:PwAff
eq_set(self, pwaff2)
Parameters:
Returns:

Set

floor(self)
Parameters:selfPwAff
Returns:PwAff
foreach_piece(self)
Parameters:
  • selfPwAff
  • fn – callback(set, aff)
Returns:

int

from_aff(aff)
Parameters:affAff
Returns:PwAff
ge_set(self, pwaff2)
Parameters:
Returns:

Set

get_aggregate_domain()
Returns:a Set that is the union of the domains of all pieces
get_ctx(self)
Parameters:selfPwAff
Returns:Context
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_domain_space(self)
Parameters:selfPwAff
Returns:Space
get_pieces()
Returns:list of (Set, Aff)
get_space(self)
Parameters:selfPwAff
Returns:Space
gist(self, context)
Parameters:
Returns:

PwAff

gist_params(self, context)
Parameters:
Returns:

PwAff

gt_set(self, pwaff2)
Parameters:
Returns:

Set

has_dim_id(self, type, pos)
Parameters:
Returns:

bool

insert_dims(self, type, first, n)
Parameters:
  • selfPwAff
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

PwAff

intersect_domain(self, set)
Parameters:
Returns:

PwAff

intersect_params(self, set)
Parameters:
Returns:

PwAff

involves_dims(self, type, first, n)
Parameters:
  • selfPwAff
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

int

is_cst(self)
Parameters:selfPwAff
Returns:bool
is_empty(self)
Parameters:selfPwAff
Returns:bool
is_valid()

Return whether current object is still valid.

le_set(self, pwaff2)
Parameters:
Returns:

Set

lt_set(self, pwaff2)
Parameters:
Returns:

Set

max(self, pwaff2)
Parameters:
Returns:

PwAff

min(self, pwaff2)
Parameters:
Returns:

PwAff

mod(self, mod)
Parameters:
  • selfPwAff
  • mod – integer
Returns:

PwAff

mul(self, pwaff2)
Parameters:
Returns:

PwAff

n_piece(self)
Parameters:selfPwAff
Returns:int
ne_set(self, pwaff2)
Parameters:
Returns:

Set

neg(self)
Parameters:selfPwAff
Returns:PwAff
non_zero_set(self)
Parameters:selfPwAff
Returns:Set
nonneg_set(self)
Parameters:selfPwAff
Returns:Set
plain_is_equal(self, pwaff2)
Parameters:
Returns:

int

read_from_str(ctx, str)
Parameters:
Returns:

PwAff

scale(self, f)
Parameters:
  • selfPwAff
  • f – integer
Returns:

PwAff

scale_down(self, f)
Parameters:
  • selfPwAff
  • f – integer
Returns:

PwAff

set_dim_id(self, type, pos, id)
Parameters:
Returns:

PwAff

set_tuple_id(self, type, id)
Parameters:
Returns:

PwAff

space

get_space(self)

Parameters:selfPwAff
Returns:Space
sub(self, pwaff2)
Parameters:
Returns:

PwAff

union_add(self, pwaff2)
Parameters:
Returns:

PwAff

union_max(self, pwaff2)
Parameters:
Returns:

PwAff

union_min(self, pwaff2)
Parameters:
Returns:

PwAff

zero_set(self)
Parameters:selfPwAff
Returns:Set

Multiply Affine Expressions

Multiply Affine Expression

class islpy.MultiAff(s, context=None)
add(self, maff2)
Parameters:
Returns:

MultiAff

copy(self)
Parameters:selfMultiAff
Returns:MultiAff
dim(self, type)
Parameters:
Returns:

unsigned

drop_dims(self, type, first, n)
Parameters:
Returns:

MultiAff

flat_range_product(self, ma2)
Parameters:
Returns:

MultiAff

get_aff(self, pos)
Parameters:
Returns:

Aff

get_ctx(self)
Parameters:selfMultiAff
Returns:Context
get_space(self)
Parameters:selfMultiAff
Returns:Space
gist(self, context)
Parameters:
Returns:

MultiAff

gist_params(self, context)
Parameters:
Returns:

MultiAff

is_valid()

Return whether current object is still valid.

lift(self)
Parameters:selfMultiAff
Returns:tuple: (MultiAff, ls (LocalSpace))
plain_is_equal(self, maff2)
Parameters:
Returns:

int

read_from_str(ctx, str)
Parameters:
Returns:

MultiAff

scale(self, f)
Parameters:
Returns:

MultiAff

set_dim_name(self, type, pos, s)
Parameters:
Returns:

MultiAff

set_tuple_id(self, type, id)
Parameters:
Returns:

MultiAff

space

get_space(self)

Parameters:selfMultiAff
Returns:Space
zero(space)
Parameters:spaceSpace
Returns:MultiAff

Piecewise Multiply Affine Expression

class islpy.PwMultiAff(s, context=None)
add(self, pma2)
Parameters:
Returns:

PwMultiAff

alloc(set, maff)
Parameters:
Returns:

PwMultiAff

coalesce(self)
Parameters:selfPwMultiAff
Returns:PwMultiAff
copy(self)
Parameters:selfPwMultiAff
Returns:PwMultiAff
dim(self, type)
Parameters:
Returns:

unsigned

domain(self)
Parameters:selfPwMultiAff
Returns:Set
empty(space)
Parameters:spaceSpace
Returns:PwMultiAff
flat_range_product(self, pma2)
Parameters:
Returns:

PwMultiAff

foreach_piece(self)
Parameters:
Returns:

int

from_domain(set)
Parameters:setSet
Returns:PwMultiAff
from_map(map)
Parameters:mapMap
Returns:PwMultiAff
from_multi_aff(ma)
Parameters:maMultiAff
Returns:PwMultiAff
from_set(set)
Parameters:setSet
Returns:PwMultiAff
get_ctx(self)
Parameters:selfPwMultiAff
Returns:Context
get_dim_id(self, type, pos)
Parameters:
Returns:

Id

get_dim_name(self, type, pos)
Parameters:
Returns:

string

get_domain_space(self)
Parameters:selfPwMultiAff
Returns:Space
get_pw_aff(self, pos)
Parameters:
Returns:

PwAff

get_space(self)
Parameters:selfPwMultiAff
Returns:Space
get_tuple_id(self, type)
Parameters:
Returns:

Id

get_tuple_name(self, type)
Parameters:
Returns:

string

gist(self, set)
Parameters:
Returns:

PwMultiAff

gist_params(self, set)
Parameters:
Returns:

PwMultiAff

has_tuple_id(self, type)
Parameters:
Returns:

bool

intersect_domain(self, set)
Parameters:
Returns:

PwMultiAff

intersect_params(self, set)
Parameters:
Returns:

PwMultiAff

is_valid()

Return whether current object is still valid.

plain_is_equal(self, pma2)
Parameters:
Returns:

int

read_from_str(ctx, str)
Parameters:
Returns:

PwMultiAff

set_dim_id(self, type, pos, id)
Parameters:
Returns:

PwMultiAff

set_tuple_id(self, type, id)
Parameters:
Returns:

PwMultiAff

space

get_space(self)

Parameters:selfPwMultiAff
Returns:Space
union_add(self, pma2)
Parameters:
Returns:

PwMultiAff

Union of Piecewise Multiply Affine Expression

class islpy.UnionPwMultiAff
add(self, upma2)
Parameters:
Returns:

UnionPwMultiAff

add_pw_multi_aff(self, pma)
Parameters:
Returns:

UnionPwMultiAff

copy(self)
Parameters:selfUnionPwMultiAff
Returns:UnionPwMultiAff
domain(self)
Parameters:selfUnionPwMultiAff
Returns:UnionSet
empty(space)
Parameters:spaceSpace
Returns:UnionPwMultiAff
flat_range_product(self, upma2)
Parameters:
Returns:

UnionPwMultiAff

foreach_pw_multi_aff(self)
Parameters:
Returns:

int

from_domain(uset)
Parameters:usetUnionSet
Returns:UnionPwMultiAff
get_ctx(self)
Parameters:selfUnionPwMultiAff
Returns:Context
get_space(self)
Parameters:selfUnionPwMultiAff
Returns:Space
is_valid()

Return whether current object is still valid.

space

get_space(self)

Parameters:selfUnionPwMultiAff
Returns:Space

Quasipolynomials

QPolynomial

class islpy.QPolynomial
add(self, qp2)
Parameters:
Returns:

QPolynomial

add_dims(self, type, n)
Parameters:
Returns:

QPolynomial

add_isl_int(self, v)
Parameters:
Returns:

QPolynomial

align_params(self, model)
Parameters:
Returns:

QPolynomial

as_polynomial_on_domain(self, bset)
Parameters:
Returns:

int

copy(self)
Parameters:selfQPolynomial
Returns:QPolynomial
dim(self, type)
Parameters:
Returns:

unsigned

drop_dims(self, type, first, n)
Parameters:
Returns:

QPolynomial

eval(self, pnt)
Parameters:
Returns:

QPolynomial

foreach_term(self)
Parameters:
Returns:

int

from_aff(aff)
Parameters:affAff
Returns:QPolynomial
from_constraint(c, type, pos)
Parameters:
Returns:

QPolynomial

from_term(term)
Parameters:termTerm
Returns:QPolynomial
get_ctx(self)
Parameters:selfQPolynomial
Returns:Context
get_den(self)
Parameters:selfQPolynomial
Returns:d (integer)
get_domain_space(self)
Parameters:selfQPolynomial
Returns:Space
get_space(self)
Parameters:selfQPolynomial
Returns:Space
gist(self, context)
Parameters:
Returns:

QPolynomial

gist_params(self, context)
Parameters:
Returns:

QPolynomial

homogenize(self)
Parameters:selfQPolynomial
Returns:QPolynomial
infty_on_domain(dim)
Parameters:dimSpace
Returns:QPolynomial
insert_dims(self, type, first, n)
Parameters:
Returns:

QPolynomial

involves_dims(self, type, first, n)
Parameters:
Returns:

int

is_cst(self)
Parameters:selfQPolynomial
Returns:tuple: (n (integer), d (integer))
is_infty(self)
Parameters:selfQPolynomial
Returns:bool
is_nan(self)
Parameters:selfQPolynomial
Returns:bool
is_neginfty(self)
Parameters:selfQPolynomial
Returns:bool
is_valid()

Return whether current object is still valid.

is_zero(self)
Parameters:selfQPolynomial
Returns:bool
move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
Returns:

QPolynomial

mul(self, qp2)
Parameters:
Returns:

QPolynomial

mul_isl_int(self, v)
Parameters:
Returns:

QPolynomial

nan_on_domain(dim)
Parameters:dimSpace
Returns:QPolynomial
neg(self)
Parameters:selfQPolynomial
Returns:QPolynomial
neginfty_on_domain(dim)
Parameters:dimSpace
Returns:QPolynomial
one_on_domain(dim)
Parameters:dimSpace
Returns:QPolynomial
plain_is_equal(self, qp2)
Parameters:
Returns:

int

pow(self, power)
Parameters:
Returns:

QPolynomial

print_(self, out, output_format)
Parameters:
  • selfQPolynomial
  • outfile-like
  • output_formatunsigned
Returns:

None

project_domain_on_params(self)
Parameters:selfQPolynomial
Returns:QPolynomial
rat_cst_on_domain(dim, n, d)
Parameters:
  • dimSpace
  • n – integer
  • d – integer
Returns:

QPolynomial

scale(self, v)
Parameters:
Returns:

QPolynomial

set_dim_name(self, type, pos, s)
Parameters:
Returns:

QPolynomial

sgn(self)
Parameters:selfQPolynomial
Returns:int
space

get_space(self)

Parameters:selfQPolynomial
Returns:Space
sub(self, qp2)
Parameters:
Returns:

QPolynomial

var_on_domain(dim, type, pos)
Parameters:
Returns:

QPolynomial

zero_on_domain(dim)
Parameters:dimSpace
Returns:QPolynomial

PwQPolynomial

class islpy.PwQPolynomial(s, context=None)
add(self, pwqp2)
Parameters:
Returns:

PwQPolynomial

add_dims(self, type, n)
Parameters:
Returns:

PwQPolynomial

add_disjoint(self, pwqp2)
Parameters:
Returns:

PwQPolynomial

alloc(set, qp)
Parameters:
Returns:

PwQPolynomial

bound(self, type)
Parameters:
Returns:

tuple: (PwQPolynomialFold, tight (integer))

coalesce(self)
Parameters:selfPwQPolynomial
Returns:PwQPolynomial
copy(self)
Parameters:selfPwQPolynomial
Returns:PwQPolynomial
dim(self, type)
Parameters:
Returns:

unsigned

domain(self)
Parameters:selfPwQPolynomial
Returns:Set
drop_dims(self, type, first, n)
Parameters:
Returns:

PwQPolynomial

eval(self, pnt)
Parameters:
Returns:

QPolynomial

fix_dim(self, type, n, v)
Parameters:
Returns:

PwQPolynomial

foreach_lifted_piece(self)
Parameters:
Returns:

int

foreach_piece(self)
Parameters:
Returns:

int

from_pw_aff(pwaff)
Parameters:pwaffPwAff
Returns:PwQPolynomial
from_qpolynomial(qp)
Parameters:qpQPolynomial
Returns:PwQPolynomial
get_ctx(self)
Parameters:selfPwQPolynomial
Returns:Context
get_domain_space(self)
Parameters:selfPwQPolynomial
Returns:Space
get_space(self)
Parameters:selfPwQPolynomial
Returns:Space
gist(self, context)
Parameters:
Returns:

PwQPolynomial

gist_params(self, context)
Parameters:
Returns:

PwQPolynomial

has_equal_space(self, pwqp2)
Parameters:
Returns:

bool

insert_dims(self, type, first, n)
Parameters:
Returns:

PwQPolynomial

intersect_domain(self, set)
Parameters:
Returns:

PwQPolynomial

intersect_params(self, set)
Parameters:
Returns:

PwQPolynomial

involves_dims(self, type, first, n)
Parameters:
Returns:

int

is_valid()

Return whether current object is still valid.

is_zero(self)
Parameters:selfPwQPolynomial
Returns:bool
max(self)
Parameters:selfPwQPolynomial
Returns:QPolynomial
min(self)
Parameters:selfPwQPolynomial
Returns:QPolynomial
move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
Returns:

PwQPolynomial

mul(self, pwqp2)
Parameters:
Returns:

PwQPolynomial

mul_isl_int(self, v)
Parameters:
Returns:

PwQPolynomial

neg(self)
Parameters:selfPwQPolynomial
Returns:PwQPolynomial
plain_is_equal(self, pwqp2)
Parameters:
Returns:

int

pow(self, exponent)
Parameters:
Returns:

PwQPolynomial

print_(self, out, output_format)
Parameters:
  • selfPwQPolynomial
  • outfile-like
  • output_formatunsigned
Returns:

None

project_domain_on_params(self)
Parameters:selfPwQPolynomial
Returns:PwQPolynomial
read_from_file(ctx, input)
Parameters:
  • ctxContext
  • inputfile-like
Returns:

PwQPolynomial

read_from_str(ctx, str)
Parameters:
Returns:

PwQPolynomial

reset_domain_space(self, dim)
Parameters:
Returns:

PwQPolynomial

set_dim_name(self, type, pos, s)
Parameters:
Returns:

PwQPolynomial

space

get_space(self)

Parameters:selfPwQPolynomial
Returns:Space
split_dims(self, type, first, n)
Parameters:
Returns:

PwQPolynomial

split_periods(self, max_periods)
Parameters:
Returns:

PwQPolynomial

sub(self, pwqp2)
Parameters:
Returns:

PwQPolynomial

to_polynomial(self, sign)
Parameters:
Returns:

PwQPolynomial

zero(dim)
Parameters:dimSpace
Returns:PwQPolynomial

UnionPwQPolynomial

class islpy.UnionPwQPolynomial(s, context=None)
add(self, upwqp2)
Parameters:
Returns:

UnionPwQPolynomial

add_pw_qpolynomial(self, pwqp)
Parameters:
Returns:

UnionPwQPolynomial

align_params(self, model)
Parameters:
Returns:

UnionPwQPolynomial

bound(self, type)
Parameters:
Returns:

tuple: (UnionPwQPolynomialFold, tight (integer))

coalesce(self)
Parameters:selfUnionPwQPolynomial
Returns:UnionPwQPolynomial
copy(self)
Parameters:selfUnionPwQPolynomial
Returns:UnionPwQPolynomial
domain(self)
Parameters:selfUnionPwQPolynomial
Returns:UnionSet
eval(self, pnt)
Parameters:
Returns:

QPolynomial

extract_pw_qpolynomial(self, dim)
Parameters:
Returns:

PwQPolynomial

foreach_pw_qpolynomial(self)
Parameters:
Returns:

int

from_pw_qpolynomial(pwqp)
Parameters:pwqpPwQPolynomial
Returns:UnionPwQPolynomial
get_ctx(self)
Parameters:selfUnionPwQPolynomial
Returns:Context
get_space(self)
Parameters:selfUnionPwQPolynomial
Returns:Space
gist(self, context)
Parameters:
Returns:

UnionPwQPolynomial

gist_params(self, context)
Parameters:
Returns:

UnionPwQPolynomial

intersect_domain(self, uset)
Parameters:
Returns:

UnionPwQPolynomial

intersect_params(self, set)
Parameters:
Returns:

UnionPwQPolynomial

is_valid()

Return whether current object is still valid.

mul(self, upwqp2)
Parameters:
Returns:

UnionPwQPolynomial

mul_isl_int(self, v)
Parameters:
Returns:

UnionPwQPolynomial

plain_is_equal(self, upwqp2)
Parameters:
Returns:

int

read_from_str(ctx, str)
Parameters:
Returns:

UnionPwQPolynomial

space

get_space(self)

Parameters:selfUnionPwQPolynomial
Returns:Space
sub(self, upwqp2)
Parameters:
Returns:

UnionPwQPolynomial

to_polynomial(self, sign)
Parameters:
Returns:

UnionPwQPolynomial

zero(dim)
Parameters:dimSpace
Returns:UnionPwQPolynomial

QPolynomialFold

class islpy.QPolynomialFold
alloc(type, qp)
Parameters:
Returns:

QPolynomialFold

copy(self)
Parameters:selfQPolynomialFold
Returns:QPolynomialFold
empty(type, dim)
Parameters:
Returns:

QPolynomialFold

eval(self, pnt)
Parameters:
Returns:

QPolynomial

fold(self, fold2)
Parameters:
Returns:

QPolynomialFold

foreach_qpolynomial(self)
Parameters:
Returns:

int

get_ctx(self)
Parameters:selfQPolynomialFold
Returns:Context
get_space(self)
Parameters:selfQPolynomialFold
Returns:Space
get_type(self)
Parameters:selfQPolynomialFold
Returns:isl_fold
gist(self, context)
Parameters:
Returns:

QPolynomialFold

gist_params(self, context)
Parameters:
Returns:

QPolynomialFold

is_empty(self)
Parameters:selfQPolynomialFold
Returns:bool
is_valid()

Return whether current object is still valid.

move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
Returns:

QPolynomialFold

mul_isl_int(self, v)
Parameters:
Returns:

QPolynomialFold

plain_is_equal(self, fold2)
Parameters:
Returns:

int

print_(self, out, output_format)
Parameters:
Returns:

None

scale(self, v)
Parameters:
Returns:

QPolynomialFold

space

get_space(self)

Parameters:selfQPolynomialFold
Returns:Space

PwQPolynomial

class islpy.PwQPolynomialFold
add(self, pwf2)
Parameters:
Returns:

PwQPolynomialFold

add_disjoint(self, pwf2)
Parameters:
Returns:

PwQPolynomialFold

alloc(type, set, fold)
Parameters:
Returns:

PwQPolynomialFold

bound(self)
Parameters:selfPwQPolynomialFold
Returns:tuple: (PwQPolynomialFold, tight (integer))
coalesce(self)
Parameters:selfPwQPolynomialFold
Returns:PwQPolynomialFold
copy(self)
Parameters:selfPwQPolynomialFold
Returns:PwQPolynomialFold
dim(self, type)
Parameters:
Returns:

unsigned

domain(self)
Parameters:selfPwQPolynomialFold
Returns:Set
drop_dims(self, type, first, n)
Parameters:
Returns:

PwQPolynomialFold

eval(self, pnt)
Parameters:
Returns:

QPolynomial

fix_dim(self, type, n, v)
Parameters:
Returns:

PwQPolynomialFold

fold(self, pwf2)
Parameters:
Returns:

PwQPolynomialFold

foreach_lifted_piece(self)
Parameters:
Returns:

int

foreach_piece(self)
Parameters:
Returns:

int

from_pw_qpolynomial(type, pwqp)
Parameters:
Returns:

PwQPolynomialFold

get_ctx(self)
Parameters:selfPwQPolynomialFold
Returns:Context
get_domain_space(self)
Parameters:selfPwQPolynomialFold
Returns:Space
get_space(self)
Parameters:selfPwQPolynomialFold
Returns:Space
gist(self, context)
Parameters:
Returns:

PwQPolynomialFold

gist_params(self, context)
Parameters:
Returns:

PwQPolynomialFold

has_equal_space(self, pwf2)
Parameters:
Returns:

bool

intersect_domain(self, set)
Parameters:
Returns:

PwQPolynomialFold

intersect_params(self, set)
Parameters:
Returns:

PwQPolynomialFold

is_valid()

Return whether current object is still valid.

is_zero(self)
Parameters:selfPwQPolynomialFold
Returns:bool
max(self)
Parameters:selfPwQPolynomialFold
Returns:QPolynomial
min(self)
Parameters:selfPwQPolynomialFold
Returns:QPolynomial
move_dims(self, dst_type, dst_pos, src_type, src_pos, n)
Parameters:
Returns:

PwQPolynomialFold

mul_isl_int(self, v)
Parameters:
Returns:

PwQPolynomialFold

plain_is_equal(self, pwf2)
Parameters:
Returns:

int

print_(self, out, output_format)
Parameters:
Returns:

None

project_domain_on_params(self)
Parameters:selfPwQPolynomialFold
Returns:PwQPolynomialFold
reset_space(self, dim)
Parameters:
Returns:

PwQPolynomialFold

set_dim_name(self, type, pos, s)
Parameters:
Returns:

PwQPolynomialFold

space

get_space(self)

Parameters:selfPwQPolynomialFold
Returns:Space
zero(dim, type)
Parameters:
Returns:

PwQPolynomialFold

UnionPwQPolynomialFold

class islpy.UnionPwQPolynomialFold
add_union_pw_qpolynomial(self, upwqp)
Parameters:
Returns:

UnionPwQPolynomialFold

align_params(self, model)
Parameters:
Returns:

UnionPwQPolynomialFold

coalesce(self)
Parameters:selfUnionPwQPolynomialFold
Returns:UnionPwQPolynomialFold
copy(self)
Parameters:selfUnionPwQPolynomialFold
Returns:UnionPwQPolynomialFold
domain(self)
Parameters:selfUnionPwQPolynomialFold
Returns:UnionSet
eval(self, pnt)
Parameters:
Returns:

QPolynomial

extract_pw_qpolynomial_fold(self, dim)
Parameters:
Returns:

PwQPolynomialFold

fold(self, upwf2)
Parameters:
Returns:

UnionPwQPolynomialFold

fold_pw_qpolynomial_fold(self, pwqp)
Parameters:
Returns:

UnionPwQPolynomialFold

foreach_pw_qpolynomial_fold(self)
Parameters:
Returns:

int

from_pw_qpolynomial_fold(pwf)
Parameters:pwfPwQPolynomialFold
Returns:UnionPwQPolynomialFold
get_ctx(self)
Parameters:selfUnionPwQPolynomialFold
Returns:Context
get_space(self)
Parameters:selfUnionPwQPolynomialFold
Returns:Space
get_type(self)
Parameters:selfUnionPwQPolynomialFold
Returns:isl_fold
gist(self, context)
Parameters:
Returns:

UnionPwQPolynomialFold

gist_params(self, context)
Parameters:
Returns:

UnionPwQPolynomialFold

intersect_domain(self, uset)
Parameters:
Returns:

UnionPwQPolynomialFold

intersect_params(self, set)
Parameters:
Returns:

UnionPwQPolynomialFold

is_valid()

Return whether current object is still valid.

mul_isl_int(self, v)
Parameters:
Returns:

UnionPwQPolynomialFold

plain_is_equal(self, upwf2)
Parameters:
Returns:

int

space

get_space(self)

Parameters:selfUnionPwQPolynomialFold
Returns:Space
zero(dim, type)
Parameters:
Returns:

UnionPwQPolynomialFold

Scheduling

Band

class islpy.Band
copy(self)
Parameters:selfBand
Returns:Band
get_children(self)
Parameters:selfBand
Returns:BandList
get_ctx(self)
Parameters:selfBand
Returns:Context
get_partial_schedule(self)
Parameters:selfBand
Returns:UnionMap
get_prefix_schedule(self)
Parameters:selfBand
Returns:UnionMap
get_suffix_schedule(self)
Parameters:selfBand
Returns:UnionMap
has_children(self)
Parameters:selfBand
Returns:bool
is_valid()

Return whether current object is still valid.

member_is_zero_distance(self, pos)
Parameters:
  • selfBand
  • posint
Returns:

int

n_member(self)
Parameters:selfBand
Returns:int
tile(self, sizes)
Parameters:
Returns:

int

Schedule

class islpy.Schedule
get_band_forest(self)
Parameters:selfSchedule
Returns:BandList
get_ctx(self)
Parameters:selfSchedule
Returns:Context
get_map(self)
Parameters:selfSchedule
Returns:UnionMap
is_valid()

Return whether current object is still valid.

Dataflow

Access Info

class islpy.AccessInfo
compute_flow(self)
Parameters:selfAccessInfo (becomes invalid)
Returns:Flow
get_ctx(self)
Parameters:selfAccessInfo
Returns:Context
is_valid()

Return whether current object is still valid.

Restriction

class islpy.Restriction
empty(source_map)
Parameters:source_mapMap
Returns:Restriction
get_ctx(self)
Parameters:selfRestriction
Returns:Context
input(source_restr, sink_restr)
Parameters:
  • source_restrSet
  • sink_restrSet
Returns:

Restriction

is_valid()

Return whether current object is still valid.

none(source_map)
Parameters:source_mapMap
Returns:Restriction
output(source_restr)
Parameters:source_restrSet
Returns:Restriction

Flow

class islpy.Flow
get_ctx(self)
Parameters:selfFlow
Returns:Context
get_no_source(self, must)
Parameters:
  • selfFlow
  • mustint
Returns:

Map

is_valid()

Return whether current object is still valid.

Lists

class islpy.BasicSetList
  • __hash__() (static)
is_valid()

Return whether current object is still valid.

product(self)
Parameters:selfBasicSetList
Returns:BasicSet
class islpy.SetList
  • __hash__() (static)
is_valid()

Return whether current object is still valid.

class islpy.AffList
  • __hash__() (static)
is_valid()

Return whether current object is still valid.

class islpy.BandList
  • __hash__() (static)
is_valid()

Return whether current object is still valid.

Output

class islpy.Printer
end_line(self)
Parameters:selfPrinter (mutated in-place)
Returns:Printer (self)
flush(self)
Parameters:selfPrinter (mutated in-place)
Returns:Printer (self)
get_ctx(self)
Parameters:selfPrinter
Returns:Context
get_output_format(self)
Parameters:selfPrinter
Returns:int
get_str(self)
Parameters:selfPrinter
Returns:string
indent(self, indent)
Parameters:
  • selfPrinter (mutated in-place)
  • indentint
Returns:

Printer (self)

is_valid()

Return whether current object is still valid.

print_aff(self, aff)
Parameters:
Returns:

Printer (self)

print_band(self, band)
Parameters:
Returns:

Printer (self)

print_basic_map(self, bmap)
Parameters:
Returns:

Printer (self)

print_basic_set(self, bset)
Parameters:
Returns:

Printer (self)

print_constraint(self, c)
Parameters:
Returns:

Printer (self)

print_int(self, i)
Parameters:
  • selfPrinter (mutated in-place)
  • iint
Returns:

Printer (self)

print_isl_int(self, i)
Parameters:
  • selfPrinter (mutated in-place)
  • i – integer
Returns:

Printer (self)

print_local_space(self, ls)
Parameters:
Returns:

Printer (self)

print_map(self, map)
Parameters:
Returns:

Printer (self)

print_multi_aff(self, maff)
Parameters:
Returns:

Printer (self)

print_point(self, pnt)
Parameters:
Returns:

Printer (self)

print_pw_aff(self, pwaff)
Parameters:
Returns:

Printer (self)

print_pw_multi_aff(self, pma)
Parameters:
Returns:

Printer (self)

print_pw_qpolynomial(self, pwqp)
Parameters:
Returns:

Printer (self)

print_pw_qpolynomial_fold(self, pwf)
Parameters:
Returns:

Printer (self)

print_qpolynomial(self, qp)
Parameters:
Returns:

Printer (self)

print_qpolynomial_fold(self, fold)
Parameters:
Returns:

Printer (self)

print_schedule(self, schedule)
Parameters:
Returns:

Printer (self)

print_set(self, map)
Parameters:
Returns:

Printer (self)

print_space(self, dim)
Parameters:
Returns:

Printer (self)

print_str(self, s)
Parameters:
  • selfPrinter (mutated in-place)
  • s – string
Returns:

Printer (self)

print_union_map(self, umap)
Parameters:
Returns:

Printer (self)

print_union_pw_multi_aff(self, upma)
Parameters:
Returns:

Printer (self)

print_union_pw_qpolynomial(self, upwqp)
Parameters:
Returns:

Printer (self)

print_union_pw_qpolynomial_fold(self, upwf)
Parameters:
Returns:

Printer (self)

print_union_set(self, uset)
Parameters:
Returns:

Printer (self)

print_vec(self, vec)
Parameters:
Returns:

Printer (self)

set_indent(self, indent)
Parameters:
  • selfPrinter (mutated in-place)
  • indentint
Returns:

Printer (self)

set_isl_int_width(self, width)
Parameters:
  • selfPrinter (mutated in-place)
  • widthint
Returns:

Printer (self)

set_output_format(self, output_format)
Parameters:
  • selfPrinter (mutated in-place)
  • output_formatint
Returns:

Printer (self)

set_prefix(self, prefix)
Parameters:
  • selfPrinter (mutated in-place)
  • prefix – string
Returns:

Printer (self)

set_suffix(self, suffix)
Parameters:
  • selfPrinter (mutated in-place)
  • suffix – string
Returns:

Printer (self)

start_line(self)
Parameters:selfPrinter (mutated in-place)
Returns:Printer (self)
to_file(ctx, file)
Parameters:
  • ctxContext
  • filefile-like
Returns:

Printer

to_str(ctx)
Parameters:ctxContext
Returns:Printer

Helper functions

islpy.align_spaces(obj, tgt, obj_bigger_ok=False)

Try to make the space in which obj lives the same as that of tgt by adding/matching named dimensions.

Parameters:obj_bigger_ok – If True, no error is raised if the resulting obj has more dimensions than tgt.
islpy.align_two(obj1, obj2)

Align the spaces of two objects, potentially modifying both of them.

See also align_spaces().