public class FuzzyRule
extends java.lang.Object
Represents a fuzzy rule.
Modifier and Type | Field and Description |
---|---|
int |
consequent
Consequent of the rule.
|
double |
weight
Weight of the rule.
|
Constructor and Description |
---|
FuzzyRule()
Constructor by default.
|
FuzzyRule(FuzzyRule r)
A copy constructor for fuzzy rule, given other fuzzy rule.
|
FuzzyRule(int a,
double b)
A constructor for a fuzzy rule, given its consequent and weight in the base rules.
|
Modifier and Type | Method and Description |
---|---|
FuzzyRule |
clone()
Creates and returns a copy of this object.
|
void |
set(FuzzyRule r)
Copies the FuzzyRule parameter over the present instance.
|
public int consequent
public double weight
public FuzzyRule()
Constructor by default. It creates a fuzzy rule with consequent 0 and weight 0.
public FuzzyRule(int a, double b)
A constructor for a fuzzy rule, given its consequent and weight in the base rules.
a
- consequentb
- weightpublic FuzzyRule(FuzzyRule r)
A copy constructor for fuzzy rule, given other fuzzy rule.
r
- to be copied.public void set(FuzzyRule r)
Copies the FuzzyRule parameter over the present instance.
r
- a FuzzyRule object to be copiedpublic FuzzyRule clone()
Creates and returns a copy of this object.
clone
in class java.lang.Object