public class ConjReglas
extends java.lang.Object
Set of rules. Defines a set of rules or complex
Constructor and Description |
---|
ConjReglas()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addRegla(Regla regl)
Add a rule to the list
|
void |
adjuntaNombreClase(java.lang.String nombreClase)
Do a clocal copy of the name of the class variable
|
void |
adjuntaNombreClases(java.lang.String[] clases)
Do a local copy of the name of the values of the class
|
void |
ajusta(int[] cambio)
Do a local copy of the values of the rules.
|
ConjReglas |
copiaConjReglas()
Do a copy of the complet set of the rules
|
void |
deleteRegla(int i)
Removes a rule from the list
|
java.util.LinkedList |
getConjReglas()
Returns the complet set if rules
|
Regla |
getNuevaRegla(int i)
Returns a rule as a copy of the list
|
Regla |
getRegla(int i)
Returns a rule of the list
|
Regla |
getUltimaRegla()
Returns the last rule(normally the one with best weight)
|
void |
print()
Prints on the screen the set of rules
|
java.lang.String |
printString()
Prints on a string the set of rules
|
int |
size()
Returns the number of rules we are working with
|
public void addRegla(Regla regl)
Add a rule to the list
regl
- Rule to addpublic void deleteRegla(int i)
Removes a rule from the list
i
- index of the rule to removepublic Regla getRegla(int i)
Returns a rule of the list
i
- index of the rulepublic Regla getNuevaRegla(int i)
Returns a rule as a copy of the list
i
- index of the rulepublic int size()
Returns the number of rules we are working with
public java.util.LinkedList getConjReglas()
Returns the complet set if rules
public ConjReglas copiaConjReglas()
Do a copy of the complet set of the rules
public void print()
Prints on the screen the set of rules
public java.lang.String printString()
Prints on a string the set of rules
public Regla getUltimaRegla()
Returns the last rule(normally the one with best weight)
public void ajusta(int[] cambio)
Do a local copy of the values of the rules.
cambio
- int[] vector with the new values.public void adjuntaNombreClase(java.lang.String nombreClase)
Do a clocal copy of the name of the class variable
nombreClase
- Name of the classpublic void adjuntaNombreClases(java.lang.String[] clases)
Do a local copy of the name of the values of the class
clases
- String[] An array that stores the name of the value of the class