nifty7.operators.simplify_for_const module

class ConstCollector[source]

Bases: object

add(const, fulldom)[source]
property constfield
mult(const, fulldom)[source]
class ConstantEnergyOperator(output)[source]

Bases: nifty7.operators.energy_operators.EnergyOperator

Operator which has a scalar domain as target domain.

It is intended as an objective function for field inference. It can implement a positive definite, symmetric form (called metric) that is used as curvature for second-order minimizations.

Examples

  • Information Hamiltonian, i.e. negative-log-probabilities.

  • Gibbs free energy, i.e. an averaged Hamiltonian, aka Kullback-Leibler divergence.

apply(x)[source]

Applies the operator to a Field or MultiField.

Parameters

x (Field or MultiField) – Input on which the operator shall act. Needs to be defined on domain.

class ConstantOperator(output)[source]

Bases: nifty7.operators.operator.Operator

Transforms values defined on one domain into values defined on another domain, and can also provide the Jacobian.

__repr__()[source]

Return repr(self).

apply(x)[source]

Applies the operator to a Field or MultiField.

Parameters

x (Field or MultiField) – Input on which the operator shall act. Needs to be defined on domain.

class InsertionOperator(target, cst_field)[source]

Bases: nifty7.operators.operator.Operator

Transforms values defined on one domain into values defined on another domain, and can also provide the Jacobian.

__repr__()[source]

Return repr(self).

apply(x)[source]

Applies the operator to a Field or MultiField.

Parameters

x (Field or MultiField) – Input on which the operator shall act. Needs to be defined on domain.