Injective Level Transition (injection)¶
- class pypint.multi_level_providers.level_transition_providers.injection.Injection(*args, **kwargs)[source]¶
-
Injective restringation and prolongation.
Injection restringates a fine level with \(n\) points onto a coarse level with \(\frac{n+1}{2}\) points by leaving out every other data point.
On prolongation, injection interpolates a new point between two coarse data points as their arithmetic mean.
Raises: ValueError – if number of fine level points is even (fine_level_points) Notes
Injective restringation and prolongation only works for a fine level with an odd number of points. The coarse level might have an even number of points.
In addition, injection should only be used when the number of coarse points is a subset of the fine points.