GoalWithValue

GoalReferences
public abstract class GoalWithValue : Goal
A goal with associated text label.

Constructors

GoalWithValue

#
protected GoalWithValue(Nomen nomen, IIcon icon, Value value, params Edge[] referencedEdges)
nomen (Nomen)
icon (IIcon)
value (Value)
referencedEdges (params Edge[])

Fields

_edges

protected readonly Edge[] _edges
inherited fromGoal

Properties

EdgeCount

public int EdgeCount { get; }
Gets the number of edges this goal is associated with.
inherited fromGoal

Icon

public IIcon Icon { get; }
Gets the icon of this goal.
inherited fromGoal

Id

public Guid Id { get; }
Gets the id of this goal.
inherited fromGoal

Nomen

public Nomen Nomen { get; }
Gets the description of this goal.
inherited fromGoal

Value

#
public Value Value { get; }
Gets the value linked to this goal.

Methods

Apply

public abstract bool Apply(IIteration iteration)
Apply this constraint to a system.
inherited fromGoal
iteration (IIteration)Constraint system iteration within which to solve this goal.
Success state.

DependsOnId

public bool DependsOnId(Guid nodeId)
Test whether this goal depends on a specific node or scalar id.
inherited fromGoal
nodeId (Guid)

Edge

public Edge Edge(int index)
Gets the referenced edge at the given index.
inherited fromGoal
index (int)

RemoveReferents

public virtual Goal RemoveReferents(HashSet<Guid> map)
Return a modified goal in response to the removal of node or edge referents. By default this method will return null if one of the referenced edges occurs in the map.
inherited fromGoal
map (HashSet<Guid>)

ResolveCoordinate

#
protected bool ResolveCoordinate(IIteration iteration, out Point2d value)
iteration (IIteration)
value (out Point2d)

ResolveNumber

#
protected bool ResolveNumber(IIteration iteration, out double value)
iteration (IIteration)
value (out double)

WithValue

#
public abstract GoalWithValue WithValue(Value newValue)
Return a goal of this same type with a new value.
newValue (Value)