PPL Java Language Interface 2.0
parma_polyhedra_library.Partial_Function Class Reference

An incrementally built injective partial function on space dimension indices. More...

Inheritance diagram for parma_polyhedra_library.Partial_Function:

Public Member Functions

 Partial_Function ()
 Builds the empty map.
native void insert (long i, long j)
 Inserts mapping from i to j.
native boolean has_empty_codomain ()
 Returns true if and only if the partial function has an empty codomain (i.e., it is always undefined).
native long max_in_codomain ()
 Returns the maximum value that belongs to the codomain of the partial function.
native long maps (long i)
 If the partial function is defined on index i, returns its value.
native void free ()
 Releases all resources managed by this, also resetting it to a null reference.

Protected Member Functions

native void finalize ()
 Releases all resources managed by this.
Protected Member Functions inherited from parma_polyhedra_library.PPL_Object
 PPL_Object ()
 Builds an object that points to `null'.

Detailed Description

An incrementally built injective partial function on space dimension indices.

This class is used in order to specify how space dimensions should be mapped by methods named map_space_dimensions. When passed to such a method, its source indices must be existing dimensions and its target indices must form a contiguous range starting at zero. Undefined source dimensions are removed. Explicit release and finalization clear the native handle and are idempotent. Subsequent native operations raise Invalid_Argument_Exception.

Member Function Documentation

◆ insert()

native void parma_polyhedra_library.Partial_Function.insert ( long i,
long j )

Inserts mapping from i to j.

Precondition
Both indices must be nonnegative valid space dimension indices. The index i must not already occur as a source, and j must not already occur as a target, even in an identical binding.

Duplicate indices are diagnosed by assertions in debug builds. Negative or unrepresentable indices raise Invalid_Argument_Exception. Violating the remaining preconditions has undefined behavior.

Parameters
iThe index of the selected element or space dimension.
jThe index of the selected element or space dimension.

◆ has_empty_codomain()

native boolean parma_polyhedra_library.Partial_Function.has_empty_codomain ( )

Returns true if and only if the partial function has an empty codomain (i.e., it is always undefined).

This method will always be called before the other methods of the interface. Moreover, if true is returned, then none of the other interface methods will be called.

Returns
true if and only if the partial function has an empty codomain (i.e., it is always undefined).

◆ max_in_codomain()

native long parma_polyhedra_library.Partial_Function.max_in_codomain ( )

Returns the maximum value that belongs to the codomain of the partial function.

Returns
The greatest value in the nonempty codomain.

◆ maps()

native long parma_polyhedra_library.Partial_Function.maps ( long i)

If the partial function is defined on index i, returns its value.

The function returns a negative value if the partial function is not defined on domain value i. Negative or unrepresentable indices raise Invalid_Argument_Exception.

Parameters
iThe index of the selected element or space dimension.
Returns
The mapped index, or a negative value when the partial function is undefined at the supplied index.

The documentation for this class was generated from the following file:
  • Partial_Function.java