Programming Reference for VirtualLab Fusion  2022.1
Public Member Functions | Public Attributes | Properties | List of all members
ConstraintDomain Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Collection of information for the transmission or signal domain. More...

Inheritance diagram for ConstraintDomain:

Public Member Functions

int AddConstraint (Constraint constr)
 Adds a given constraint to the Constraints array and sets its Domain property to this instance. More...
 
int AddParameterField (ComplexField field)
 Adds a given ComplexField to the list of parameter fields More...
 
int AddRegionField (IRegion1D2D field)
 Adds a region to the list of region fields More...
 
int AddScaleFactor (ScaleFactor sf)
 Adds a given scale factor to the ScaleFactors array and sets its Domain property to this instance. More...
 
void ApplyAllSequentially (ComplexField field, SamplingParameters samplingParametersOfField)
 Apply all constraints sequentially. Function includes propagation steps and scale factor calculation. More...
 
void ApplyAllSequentially (ComplexField field, SamplingParameters samplingParametersOfField, double projectionStrength)
 Apply all constraints sequentially. Function includes propagation steps and scale factor calculation. More...
 
void ApplyAllSequentially (ComplexField field, SamplingParameters samplingParametersOfField, double projectionStrength, out double ssdeSig, out double deviation)
 Apply all constraints sequentially. Function includes propagation steps and scale factor calculation. Squared distance errors in signal planes and quadratic deviation between field before and after this operation are calculated. More...
 
void ApplyFirstPropagation (ComplexField field)
 Applies the first propagation. More...
 
void ApplySecondPropagation (ComplexField field)
 Applies the second propagation. More...
 
void CalculateScaleFactors (ComplexField field, SamplingParameters samplingParametersOfField)
 Calculate all scale factors More...
 
 ConstraintDomain ()
 Standard constructor
 
double GetDeviation (ComplexField field, SamplingParameters samplingParametersOfField)
 Calculate quadratic deviation between original field and projected field for projection strength 1 More...
 
Complex GetParameterFieldValue (int parameterFieldIndex, int x, int y)
 Get value of a specific point in a specific parameter field. More...
 
Complex GetScaleFactorValue (int scaleFactorIndex)
 Get value of a specific scale factor. More...
 
bool IsPointInRegion (int regionFieldIndex, int coord)
 Determines whether the given position belongs to the given region. More...
 
bool IsPointInRegion (int regionFieldIndex, int x, int y)
 Determines whether the given position lies within the given region. More...
 

Public Attributes

Constraint[] Constraints
 Constraints in that domain.
 
bool EnableFirstPropagation
 Whether to apply first propagation
 
bool EnableSecondPropagation
 Whether to apply second propagation
 
bool ForceLinearProjectionStrengthApplication
 If false, in the ApplyAllSequentially functions with projectionStrength parameter, the projection strength is invoked by the constraints. Otherwise, a linear projection strength is invoked for all constraint
simultaneously. The latter case is important in case of multiple constraints with non-disjoint region fields. The first case, which is default for backward compatibility, is necessary e.g. for soft quantization, where the projection strength is invoked non-linearly.
 
ComplexField[] ParameterFields
 Array of parameter fields. When indexing to this array, index -1 should correspond to the field constant 1.
 
PropagationOperator PropagationOperator
 Propagation operator to be used for the ConstraintDomain (optional)
 
IRegion1D2D[] RegionFields
 Array of region fields. When indexing to this array, index -1 should correspond to the full region.
 
ScaleFactor[] ScaleFactors
 Scale factors. When indexing to this array, index -1 should correspond to scale factor value 1.
 

Properties

bool IsElementConstraint [get, set]
 Gets and sets whether the constraint is in transmission domain.
 
bool IsSignalConstraint [get, set]
 Gets and sets whether the constraint is in signal domain.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Collection of information for the transmission or signal domain.

Member Function Documentation

◆ AddConstraint()

int AddConstraint ( Constraint  constr)

Adds a given constraint to the Constraints array and sets its Domain property to this instance.

Parameters
constrThe constraint to add.
Returns
Index of added constraint.

◆ AddParameterField()

int AddParameterField ( ComplexField  field)

Adds a given ComplexField to the list of parameter fields

Parameters
fieldField to be added
Returns
Index of added parameter field

◆ AddRegionField()

int AddRegionField ( IRegion1D2D  field)

Adds a region to the list of region fields

Parameters
fieldField to be added
Returns
Index of added region field

◆ AddScaleFactor()

int AddScaleFactor ( ScaleFactor  sf)

Adds a given scale factor to the ScaleFactors array and sets its Domain property to this instance.

Parameters
sfScale factor to be added.
Returns
Index of added scale factor

◆ ApplyAllSequentially() [1/3]

void ApplyAllSequentially ( ComplexField  field,
SamplingParameters  samplingParametersOfField 
)

Apply all constraints sequentially. Function includes propagation steps and scale factor calculation.

Parameters
fieldField where constraints are to be applied to
samplingParametersOfFieldThe sampling parameters of the field.

◆ ApplyAllSequentially() [2/3]

void ApplyAllSequentially ( ComplexField  field,
SamplingParameters  samplingParametersOfField,
double  projectionStrength 
)

Apply all constraints sequentially. Function includes propagation steps and scale factor calculation.

Parameters
fieldField where constraints are to be applied to
samplingParametersOfFieldThe sampling parameters of the field.
projectionStrengthThe projection strength.

◆ ApplyAllSequentially() [3/3]

void ApplyAllSequentially ( ComplexField  field,
SamplingParameters  samplingParametersOfField,
double  projectionStrength,
out double  ssdeSig,
out double  deviation 
)

Apply all constraints sequentially. Function includes propagation steps and scale factor calculation. Squared distance errors in signal planes and quadratic deviation between field before and after this operation are calculated.

Parameters
fieldField where constraints are to be applied to
samplingParametersOfFieldThe sampling parameters of the field.
projectionStrengthProjection strength
ssdeSigReturns the summed squared distance errors in signal planes
deviationReturns the quadratic deviation between original field and field after applying projections for the selected projection strength

◆ ApplyFirstPropagation()

void ApplyFirstPropagation ( ComplexField  field)

Applies the first propagation.

Parameters
fieldThe field to propagate.

◆ ApplySecondPropagation()

void ApplySecondPropagation ( ComplexField  field)

Applies the second propagation.

Parameters
fieldThe field to propagate.

◆ CalculateScaleFactors()

void CalculateScaleFactors ( ComplexField  field,
SamplingParameters  samplingParametersOfField 
)

Calculate all scale factors

Parameters
fieldField obtained by DoForwardPropagation
samplingParametersOfFieldThe sampling parameters of the field.

◆ GetDeviation()

double GetDeviation ( ComplexField  field,
SamplingParameters  samplingParametersOfField 
)

Calculate quadratic deviation between original field and projected field for projection strength 1

Parameters
fieldOriginal field. Remains unmodified during this operation.
samplingParametersOfFieldThe sampling parameters of the field.
Returns
Quadratic deviation between original field and projected field for projection strength 1

◆ GetParameterFieldValue()

Complex GetParameterFieldValue ( int  parameterFieldIndex,
int  x,
int  y 
)

Get value of a specific point in a specific parameter field.

Parameters
parameterFieldIndexThe index of the parameter field.
xThe x-position in the parameter field.
yThe x-position in the parameter field.
Returns
The desired value. 1 if the parameterFieldIndex is -1.

◆ GetScaleFactorValue()

Complex GetScaleFactorValue ( int  scaleFactorIndex)

Get value of a specific scale factor.

Parameters
scaleFactorIndexThe index of the scale factor.
Returns
The value of the scale factor. 1 if the scaleFactorIndex is -1.

◆ IsPointInRegion() [1/2]

bool IsPointInRegion ( int  regionFieldIndex,
int  coord 
)

Determines whether the given position belongs to the given region.

Parameters
regionFieldIndexThe index of the region.
coordThe position.
Returns
Whether the given position lies within the given region. True if the region field index is -1.
Exceptions
ExceptionMethod can be used for 1D regions only.

◆ IsPointInRegion() [2/2]

bool IsPointInRegion ( int  regionFieldIndex,
int  x,
int  y 
)

Determines whether the given position lies within the given region.

Parameters
regionFieldIndexThe index of the region.
xThe x-position.
yThe y-position.
Returns
Whether the given position lies within the given region. True if the region field index is -1.
Exceptions
ExceptionMethod can be used for 2D regions only.