public class Model extends Object
Rules
. A ModelApplication
can be used to combine a Model with data to perform inference or learn.Modifier and Type | Field and Description |
---|---|
protected List<Rule> |
rules |
protected Set<Rule> |
ruleSet
Redundant set for fast membership checks
|
Constructor and Description |
---|
Model() |
Modifier and Type | Method and Description |
---|---|
void |
addRule(Rule rule)
Adds a Rule to this Model.
|
String |
asString()
Create a model string that can be directly interpreted by the parser.
|
void |
clear() |
List<Rule> |
getRules() |
void |
removeRule(Rule rule)
Removes a Rule from this Model.
|
String |
toString()
Returns a String representation of this Model.
|
public void addRule(Rule rule)
rule
- Rule to addIllegalArgumentException
- if the Rule is already in this Modelpublic void removeRule(Rule rule)
rule
- Rule to removeIllegalArgumentException
- if the Rule is not in this Modelpublic void clear()
public String toString()
public String asString()
Copyright © 2018 University of California, Santa Cruz. All rights reserved.