SplitFeasibility#

class SplitFeasibility(A, algorithmic_relaxation=1.0, proximity_flag=True)[source]#

Bases: Feasibility, ABC

Abstract base class used to represent split feasibility problems.

Parameters:
  • A (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]] | sparray) – Matrix connecting input and target space.

  • algorithmic_relaxation (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]] | float) – The relaxation parameter used by the algorithm, by default 1.0.

  • proximity_flag (bool) – A flag indicating whether to use this object for proximity calculations, by default True.

Attributes:
ALinearMapping

Linear mapping between input and target space.

proximitieslist

A list to store proximity values during the solve process.

algorithmic_relaxationnpt.NDArray or float, optional

The relaxation parameter used by the algorithm, by default 1.0.

proximity_flagbool, optional

A flag indicating whether to use this object for proximity calculations.

relaxationfloat, optional

The relaxation parameter for the projection, by default 1.0.

Methods

map(x)

Maps the input space array to the target space via matrix multiplication.

map_back(y)

Transposed map of the target space array to the input space.

project(x[, y])

Projects the input array onto the feasible set.

proximity(x, proximity_measures)

Calculate proximity measures of point x to the set.

solve(x[, max_iter, prox_tol, del_prox_tol, ...])

Solves the split feasibility problem for a given input array.

step(x[, y])

Perform the (possibly relaxed) projection of input array 'x' onto the constraint.

map(x)[source]#

Maps the input space array to the target space via matrix multiplication.

Parameters:

x (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]]) – The input space array to be mapped.

Return type:

ndarray

Returns:

The corresponding target space array.

map_back(y)[source]#

Transposed map of the target space array to the input space.

Parameters:

y (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]]) – The target space array to map.

Return type:

ndarray

Returns:

The corresponding array in input space.

project(x, y=None)[source]#

Projects the input array onto the feasible set.

Parameters:
  • x (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]]) – The input array to project.

  • y (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]] | None) – An optional array for projection (default is None).

Return type:

tuple

Returns:

A (x, y) pair of projected arrays; y may be None.

proximity(x, proximity_measures)#

Calculate proximity measures of point x to the set.

Parameters:

x (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]]) – Input array for which the proximity measure is to be calculated.

Return type:

float

Returns:

The proximity measures of the input array x.

solve(x, max_iter=10, prox_tol=1e-06, del_prox_tol=1e-08, del_prox_n=5, storage=False, storage_iters=None, proximity_measures=None, alternative_stopping_criterion=None, alternative_stopping_criterion_initial_call=None)[source]#

Solves the split feasibility problem for a given input array.

Parameters:
  • x (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]]) – Starting point for the algorithm.

  • max_iter (int) – The maximum number of iterations (default is 10).

  • prox_tol (float) – Stopping criterium for the feasibility seeking algorithm. Solution deemed feasible if the proximity drops below this value (default is 1e-6).

  • del_prox_tol (float) – The tolerance for the change in proximity over the last del_prox_n iterations, by default 1e-8.

  • del_prox_n (int) – The number of iterations to check for the change in proximity, by default 5.

  • storage (bool) – A flag indicating whether to store all intermediate solutions (default is False).

  • storage_iters (Union[List[int], int, None]) – Controls which iterations are stored (when storage=True). If None, all iterations are stored. If a list of ints, only those iteration indices are stored (0 = initial point). If an int, storage occurs every that many iterations.

  • proximity_measures (Optional[List]) – The proximity measures to calculate, by default None. Right now only the first in the list is used to check the feasibility.

  • alternative_stopping_criterion (Optional[Callable]) – Alternative stopping criterion.

  • alternative_stopping_criterion_initial_call (Optional[Callable]) – Initial call for an alternative stopping criterion.

Return type:

ndarray

Returns:

The solution after applying the feasibility seeking algorithm.

step(x, y=None)[source]#

Perform the (possibly relaxed) projection of input array ‘x’ onto the constraint.

Parameters:

x (ndarray[tuple[Any, ...], dtype[TypeVar(_ScalarT, bound= generic)]]) – The input array to be projected.

Return type:

tuple

Returns:

The (possibly relaxed) projection of ‘x’ onto the constraint.