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’.

Error Reporting

exception islpy.Error

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_uncurry(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.
get_var_names(basic_instance, *args, **kwargs)

Return a list of dim names (in order) for dim_type dimtype.

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_domain(self, space2)
Parameters:
Returns:

bool

is_equal(self, space2)
Parameters:
Returns:

bool

is_map(self)
Parameters:selfSpace
Returns:bool
is_params(self)
Parameters:selfSpace
Returns:bool
is_range(self, space2)
Parameters:
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

uncurry(self)
Parameters:selfSpace
Returns:Space
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_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_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.
get_var_names(dimtype)

Return a list of dim names (in order) for dim_type dimtype.

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

bool

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
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.
get_var_names(dimtype)

Return a list of dim names (in order) for dim_type dimtype.

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
concat(self, vec2)
Parameters:
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

fdiv_r(self, m)
Parameters:
  • selfVec
  • m – integer
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:

BasicSet

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:

BasicSet

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_any_lower_bound(self, type, pos)
Parameters:
Returns:

int

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

int

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

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

BasicSet

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

BasicSet

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

BasicSet

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:selfBasicSet
Returns:BasicSet
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
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.
get_var_names(dimtype)

Return a list of dim names (in order) for dim_type dimtype.

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:
Returns:

BasicSet

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_disjoint(self, set2)
Parameters:
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_cmp(self, set2)
Parameters:
Returns:

int

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
preimage_multi_aff(self, ma)
Parameters:
Returns:

BasicSet

preimage_pw_multi_aff(self, pma)
Parameters:
Returns:

Set

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:
Returns:

BasicSet

remove_redundancies(self)
Parameters:selfBasicSet
Returns:BasicSet
remove_unknown_divs(self)
Parameters:selfBasicSet
Returns:BasicSet
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
unshifted_simple_hull(self)
Parameters:selfSet
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:

BasicMap

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_uncurry(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

drop_constraints_involving_dims(self, type, first, n)
Parameters:
  • selfMap
  • typedim_type
  • firstunsigned
  • nunsigned
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

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

Map

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

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.
get_var_names(dimtype)

Return a list of dim names (in order) for dim_type dimtype.

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_dim_name(self, type, pos)
Parameters:
Returns:

bool

has_equal_space(self, map2)
Parameters:
Returns:

bool

has_tuple_id(self, type)
Parameters:
Returns:

bool

has_tuple_name(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:
Returns:

BasicMap

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_disjoint(self, map2)
Parameters:
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
lexmax_pw_multi_aff(self)
Parameters:selfMap
Returns:PwMultiAff
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_ge(self, type1, pos1, type2, pos2)
Parameters:
Returns:

BasicMap

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

Map

order_lt(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, bmap2)
Parameters:
Returns:

BasicMap

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_divs_involving_dims(self, type, first, n)
Parameters:
Returns:

BasicMap

remove_redundancies(self)
Parameters:selfBasicMap
Returns:BasicMap
remove_unknown_divs(self)
Parameters:selfMap
Returns:Map
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))
uncurry(self)
Parameters:selfBasicMap
Returns:BasicMap
union(self, bmap2)
Parameters:
Returns:

Map

universe(dim)
Parameters:dimSpace
Returns:BasicMap
universe_like(self)
Parameters:selfBasicMap
Returns:BasicMap
unshifted_simple_hull(self)
Parameters:selfMap
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_any_lower_bound(self, type, pos)
Parameters:
Returns:

int

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

int

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_constraints_involving_dims(self, type, first, n)
Parameters:
  • selfSet
  • typedim_type
  • firstunsigned
  • nunsigned
Returns:

Set

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
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.
get_var_names(dimtype)

Return a list of dim names (in order) for dim_type dimtype.

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_disjoint(self, set2)
Parameters:
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_cmp(self, set2)
Parameters:
Returns:

int

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
preimage_multi_aff(self, ma)
Parameters:
Returns:

Set

preimage_pw_multi_aff(self, pma)
Parameters:
Returns:

Set

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
unshifted_simple_hull(self)
Parameters:selfSet
Returns:BasicSet
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_uncurry(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

drop_constraints_involving_dims(self, type, first, n)
Parameters:
  • selfMap
  • typedim_type
  • firstunsigned
  • nunsigned
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

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

Map

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

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.
get_var_names(dimtype)

Return a list of dim names (in order) for dim_type dimtype.

gist(self, context)