The function will return a new CRF with additional components:
original
The original CRF.
clamped
The vector of fixed states of nodes.
node.id
The vector of the original node ids for nodes in the new CRF.
node.map
The vector of the new node ids for nodes in the original CRF.
edge.id
The vector of the original edge ids for edges in the new CRF.
edge.map
The vector of the new edge ids for edges in the original CRF.
Details
The function will generate a clamped CRF from a given CRF
by fixing the states of some nodes. The vector clamped
contains the desired state for each node while zero means the state is not
fixed. The node and edge potentials are updated to the conditional
potentials based on the clamped vector.