Class ConstraintsEvaluator<TNode, TConfiguration, TEnergyData>
Computes energy of a layout based on given constraints.
Inheritance
System.Object
ConstraintsEvaluator<TNode, TConfiguration, TEnergyData>
Assembly: Edgar.dll
Syntax
public class ConstraintsEvaluator<TNode, TConfiguration, TEnergyData> : Object where TConfiguration : IEnergyConfiguration<TEnergyData>, ISmartCloneable<TConfiguration>, new()
where TEnergyData : IEnergyData, new()
Type Parameters
Name |
Description |
TNode |
|
TConfiguration |
|
TEnergyData |
|
Constructors
ConstraintsEvaluator(List<INodeConstraint<ILayout<TNode, TConfiguration>, TNode, TConfiguration, TEnergyData>>, IEnergyUpdater<TNode, TConfiguration, TEnergyData>)
Declaration
public ConstraintsEvaluator(List<INodeConstraint<ILayout<TNode, TConfiguration>, TNode, TConfiguration, TEnergyData>> constraints, IEnergyUpdater<TNode, TConfiguration, TEnergyData> energyUpdater)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<INodeConstraint<ILayout<TNode, TConfiguration>, TNode, TConfiguration, TEnergyData>> |
constraints |
|
IEnergyUpdater<TNode, TConfiguration, TEnergyData> |
energyUpdater |
|
Methods
ComputeNodeEnergy(ILayout<TNode, TConfiguration>, TNode, TConfiguration)
Run all constraints to compute energy data for a given node and its configuration.
Declaration
public TEnergyData ComputeNodeEnergy(ILayout<TNode, TConfiguration> layout, TNode node, TConfiguration configuration)
Parameters
Type |
Name |
Description |
ILayout<TNode, TConfiguration> |
layout |
|
TNode |
node |
|
TConfiguration |
configuration |
|
Returns
Type |
Description |
TEnergyData |
|
UpdateNodeEnergy(TNode, ILayout<TNode, TConfiguration>, ILayout<TNode, TConfiguration>)
Computes updated energy data of the node that was perturbed.
Declaration
public TEnergyData UpdateNodeEnergy(TNode node, ILayout<TNode, TConfiguration> oldLayout, ILayout<TNode, TConfiguration> newLayout)
Parameters
Type |
Name |
Description |
TNode |
node |
|
ILayout<TNode, TConfiguration> |
oldLayout |
|
ILayout<TNode, TConfiguration> |
newLayout |
|
Returns
Type |
Description |
TEnergyData |
|
UpdateNodeEnergy(ILayout<TNode, TConfiguration>, TNode, TConfiguration, TConfiguration, TNode, TConfiguration)
Computes updated energy data of a given node by computing all constraints.
Declaration
public TEnergyData UpdateNodeEnergy(ILayout<TNode, TConfiguration> layout, TNode perturbedNode, TConfiguration oldConfiguration, TConfiguration newConfiguration, TNode node, TConfiguration configuration)
Parameters
Type |
Name |
Description |
ILayout<TNode, TConfiguration> |
layout |
|
TNode |
perturbedNode |
|
TConfiguration |
oldConfiguration |
|
TConfiguration |
newConfiguration |
|
TNode |
node |
|
TConfiguration |
configuration |
|
Returns
Type |
Description |
TEnergyData |
|