Class CFaceSize
- java.lang.Object
-
- eu.europa.ec.eurostat.jgiscotools.agent.Constraint<AFace>
-
- eu.europa.ec.eurostat.jgiscotools.regionsimplify.CFaceSize
-
- All Implemented Interfaces:
Comparable<Constraint<?>>
public class CFaceSize extends Constraint<AFace>
Ensure faces are large enougth. Too small faces are deleted, aggregated of scaled.- Author:
- julien Gaffuri
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.europa.ec.eurostat.jgiscotools.agent.Constraint
Constraint.ConstraintPriorityComparator<R extends Agent>, Constraint.ConstraintSatisfactionComparator<R extends Agent>
-
-
Field Summary
-
Fields inherited from class eu.europa.ec.eurostat.jgiscotools.agent.Constraint
COMPARATOR_CONSTR, COMPARATOR_CONSTR_BY_SATISFACTION, satisfaction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computeCurrentValue()
void
computeGoalValue()
void
computeInitialValue()
void
computeSatisfaction()
List<Transformation<AFace>>
getTransformations()
-
Methods inherited from class eu.europa.ec.eurostat.jgiscotools.agent.Constraint
clear, compareTo, getAgent, getImportance, getMessage, getPriority, getSatisfaction, isHard, isSatisfied, setImportance, setPriority
-
-
-
-
Constructor Detail
-
CFaceSize
public CFaceSize(AFace agent, double minSizeDel, double minSizeDelHole, double minSize, boolean preserveAllUnits, boolean preserveIfPointsInIt)
- Parameters:
agent
-minSizeDel
- Below this size, the face is always deleted. Above, it is enlarged to minSize or deleted if not possibleminSizeDelHole
- Below this size, the hole always is deleted. Above, it is enlarged to minSize or deleted if not possibleminSize
- The minimum size of a facepreserveAllUnits
- Ensure that no unit disappear. At least one face of a unit is preserved.preserveIfPointsInIt
- Ensure that the face is not deleted if it has points in it.
-
-
Method Detail
-
computeInitialValue
public void computeInitialValue()
- Overrides:
computeInitialValue
in classConstraint<AFace>
-
computeCurrentValue
public void computeCurrentValue()
- Overrides:
computeCurrentValue
in classConstraint<AFace>
-
computeGoalValue
public void computeGoalValue()
- Overrides:
computeGoalValue
in classConstraint<AFace>
-
computeSatisfaction
public void computeSatisfaction()
- Specified by:
computeSatisfaction
in classConstraint<AFace>
-
getTransformations
public List<Transformation<AFace>> getTransformations()
- Overrides:
getTransformations
in classConstraint<AFace>
-
-