public class Muestra
extends java.lang.Object
Title: Muestra (Sample)
Description: Sample class: Stores an example of a dataset. These examples are treated as rules, every pair attribute-value is considered to be conditions for the class of the example.
Constructor and Description |
---|
Muestra()
Default constructor.
|
Muestra(java.util.Vector conjuntoAtributos,
Atributo claseOriginal,
int posicionFichero)
Paramater Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
estaAtributo(Atributo original)
Checks if the given attribute is already in the example.
|
boolean |
estaClase(Atributo original)
Checks if the class of the example is the same as the one passed as parameter.
|
boolean |
estaCubierta()
Checks if the example is covered.
|
Atributo |
getClase()
Returns the class of this example.
|
Atributo |
getValor(int indice)
Returns the value for the attribute/condition in the given position.
|
void |
imprimir()
Prints on the standard output the example as rule (conditions ---> class).
|
void |
insertaPosicion(int posicionFichero)
Sets tha position of the example in the file (example id).
|
void |
insertarAtributo(Atributo original)
Adds an attribute with its value to the example.
|
void |
insertarClase(Atributo original)
Adds a class that identifies the example/rule with all its attributes.
|
void |
noEstaCubierta()
Sets the example as uncovered.
|
void |
siEstaCubierta()
Sets the example as covered.
|
public Muestra()
public Muestra(java.util.Vector conjuntoAtributos, Atributo claseOriginal, int posicionFichero)
conjuntoAtributos
- Vector attributes values.claseOriginal
- String example class.posicionFichero
- int file position (example id).public void insertarAtributo(Atributo original)
original
- Atributo
pair attribute value to add.public void insertarClase(Atributo original)
original
- Atributo
class added to the rule.public void insertaPosicion(int posicionFichero)
posicionFichero
- int given position.public void siEstaCubierta()
public void noEstaCubierta()
public boolean estaCubierta()
public boolean estaAtributo(Atributo original)
original
- given attribute to be checked.public boolean estaClase(Atributo original)
original
- Class to compare with.public Atributo getValor(int indice)
indice
- int attribute position.public Atributo getClase()
public void imprimir()