org.encog.ml.ea.rules
Interface RuleHolder
-
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- BasicRuleHolder
public interface RuleHolder extends java.io.SerializableHolds a set of rules for an EA.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddConstraintRule(ConstraintRule rule)Add a constraint rule.voidaddRewriteRule(RewriteRule rule)Add a rewrite rule.java.util.List<ConstraintRule>getConstraintRules()java.util.List<RewriteRule>getRewriteRules()booleanisValid(Genome genome)Determine if the specified genome is valid according to the constraint rules.voidrewrite(Genome genome)Rewrite the specified genome.
-
-
-
Method Detail
-
addRewriteRule
void addRewriteRule(RewriteRule rule)
Add a rewrite rule. Rewrite rules can be used to simplify genomes.- Parameters:
rule- The rule to add.
-
addConstraintRule
void addConstraintRule(ConstraintRule rule)
Add a constraint rule.- Parameters:
rule- The rule to add.
-
rewrite
void rewrite(Genome genome)
Rewrite the specified genome. The genome will still perform the same function, but it may be shorter.- Parameters:
genome- The genome to rewrite.
-
isValid
boolean isValid(Genome genome)
Determine if the specified genome is valid according to the constraint rules.- Parameters:
genome- The gnome to check.- Returns:
- True, if the genome is valid.
-
getConstraintRules
java.util.List<ConstraintRule> getConstraintRules()
- Returns:
- The list of constraints.
-
getRewriteRules
java.util.List<RewriteRule> getRewriteRules()
- Returns:
- The rewrite rules.
-
-
DMelt 3.0 © DataMelt by jWork.ORG