Constraint
Direct Subclass:
Indirect Subclass:
This base class defines a general CPM constraint and provides methods that do not depend on the specific constraint used. This class is never used on its own, as it does not yet contain the actual definition of a constraint (such as a deltaH method).
In general, we distinguish between two types of constraint:
- a HardConstraint is a hard rule that must be fulfilled in order for a copy attempt to succeed;
- a SoftConstraint is an energy term in the Hamiltonian that can make a copy attempt either more or less energetically favourable, but does not by itself determine whether a copy attempt will succeed. An unfavourable outcome may be outbalanced by favourable energies from other terms, and even a copy attempt net unfavourable energy (deltaH > 0) may succeed with a success chance P = exp(-DeltaH/T).
See the subclasses SoftConstraint and HardConstraint for details. Each implemented constraint is in turn a subclass of one of these two.
Constructor Summary
Public Constructor | ||
public abstract |
constructor(conf: object) The constructor of a constraint takes a configuration object. |
Member Summary
Public Members | ||
public |
CPM on which this constraint acts. |
|
public get abstract |
This method is actually implemented in the subclass. |
|
public set |
This function attaches the relevant CPM to this constraint, so that information about this cpm can be requested from the constraint. |
|
public |
Configuration object for this constraint. |
|
public get |
parameters: object: * Get the parameters of this constraint from the conf object. |
Method Summary
Public Methods | ||
public abstract |
The optional confChecker method should verify that all the required conf parameters are actually present in the conf object and have the right format. |
Public Constructors
public abstract constructor(conf: object) source
The constructor of a constraint takes a configuration object. This method is usually overwritten by the actual constraint so that the entries of this object can be documented.
Params:
Name | Type | Attribute | Description |
conf | object | configuration settings for this constraint, containing the relevant parameters. |
Public Members
Public Methods
public abstract confChecker() source
The optional confChecker method should verify that all the required conf parameters are actually present in the conf object and have the right format. It is implemented in the subclass that specifies the actual constraint.