The module InterpolatePolynomialToLinearFunction creates a piecewise multi-linear function from a polynomial.

This is mainly for test purposes.


A caveat: The resulting function will only approximate the polynomial well in the specified (or automatic) bounding box. Outside this box, the values will most probably be completely wrong.


Default Panel


Input Fields


name: inputPolynomial, type: MLBase

Output Fields


name: outputFunction, type: MLBase

Parameter Fields

Field Index

Apply: Trigger Maximal Level per Direction: String
Auto Apply: Bool Minimal Level: Integer
Automatic Bounding Box: String Simplify polynomial: Bool
Balance Mode: Enum Use manual bounding box: Bool
Epsilon: Double  
Exponent: Double  
Manual Bounding Box: String  
Maximal Level: Integer  

Visible Fields

Automatic Bounding Box

name: autoBBox, type: String, persistent: no

Shows the automatically computes pre-image bounding box of the polynomial.

Use manual bounding box

name: useManBBox, type: Bool, default: FALSE

If checked, the manually set pre-image bounding box is used for evaluation.

Manual Bounding Box

name: manBBox, type: String

Sets a manual pre-image bounding box.

Simplify polynomial

name: simplifyPolynomial, type: Bool, default: FALSE

If checked, the polynomial will be simplified first.

This uses the same procedure as the SimplifyInterpolationPolynomial module.

This may either speed up or slow down the computation, depending on the polynomial and on the settings.

Note that simplifying a polynomial destroys the bounding box information, but that does not matter since this module evaluates the bounding box before simplifying.

Minimal Level

name: minLevel, type: Integer, default: 2, minimum: 0

The sparse grid on which the function is interpolated is refined uniformly up to this level.

Maximal Level

name: maxLevel, type: Integer, default: 10, minimum: 0

The sparse grid on which the function is interpolated is not refined more than to this level.

Maximal Level per Direction

name: maxLevelPerDirection, type: String

Sets a maximum level per direction.

Additionally to the Maximal Level field, it is possible to specify here maximal levels for each direction (separated by commas). This allows to do the following two things: First, use different maximal levels for different directions. Second, specify that the finest allowed grid is a uniform grid, which is often useful for discontinuous functions.


name: eps, type: Double, default: 1e-05

Sets an epsilon value.

Between the Minimal Level and the Maximal Level, the refinement is performed adaptively. Let ε be the value of the Epsilon, a the value of the Exponent field, n the current level, and x the surplus on a node of this level. Then, the node corresponding to x is refined if any only if x > ε-2 - na.


name: epsExponent, type: Double, default: 0

Sets an exponent value.

See documentation of field Epsilon for further information.

Balance Mode

name: balanceMode, type: Enum, default: Adaptive

Defines a balance mode.

For details about balancing, see the paper Bungartz/Dirnstorfer: Computing 71, 89-114 (2003).


Title Name
None None
Full Full
Adaptive Adaptive

Auto Apply

name: autoApply, type: Bool, default: FALSE

If checked, the module computes anew on any parameter or input change.


name: apply, type: Trigger

If pressed, the module computes anew.