constraints (pmrf.constraints)

Constraints for parameters.

Can be used for parameter factories in pmrf.parameters.

These are re-exports from the Parax library, with the goal of the covering the most common applications. For more advanced use-cases, simply use Parax directly instead.

Classes

AbstractConstraint()

The base class for all physical constraints in Parax.

RealLine([shape])

Represents a value that can span the entire real number line.

Positive([shape, dtype])

Convenience constraint for values that must be strictly positive (> 0).

Negative([shape, dtype])

Convenience constraint for values that must be strictly negative (< 0).

Interval(lower, upper)

Represents a value strictly bounded between a lower and upper value.

GreaterThan(lower)

Represents a value strictly greater than a lower bound.

LessThan(upper)

Represents a value strictly less than an upper bound.

Custom(bijector[, bounds, base_bounds, ...])

An escape hatch for power users who need a specific distreqx bijector mapping with predefined physical bounds.

Transformed(constraint, bijector)

A constraint modified by an arbitrary distreqx bijector.

Functions

intersect(a, b)

Calculates the intersection of two constraints.