seemps.analysis.factories.mps_affine#

seemps.analysis.factories.mps_affine(mps, orig, dest)[source]#

Applies an affine transformation to an MPS, mapping it from one interval [x0, x1] to another [u0, u1]. This is a transformation u = a * x + b, with u0 = a * x0 + b and and u1 = a * x1 + b. Hence, a = (u1 - u0) / (x1 - x0) and b = ((u1 + u0) - a * (x0 + x1)) / 2.

Parameters:
mpsUnion[MPS, MPSSum]

The MPS to be transformed.

origtuple

A tuple (x0, x1) representing the original interval.

desttuple

A tuple (u0, u1) representing the destination interval.

Returns:
mps_affineUnion[MPS, MPSSum]

The MPS affinely transformed from (x0, x1) to (u0, u1).