public class Muestra
extends java.lang.Object
Stores one data with the form: attribute attribute class
Constructor and Description |
---|
Muestra(double[] m,
int cl,
int tamano)
Constructor
|
Muestra(int tamano)
Other constructor, more easy
|
Modifier and Type | Method and Description |
---|---|
boolean |
compara(Muestra m)
Compare if two examples are equals
|
Muestra |
copiaMuestra()
Do a copy of the example
|
double |
getAtributo(int i)
Returns the value of the attribute 'i' of the example
|
int |
getClase()
Returns the example's class
|
int |
getCubierta()
Returns the number of times that the example has benn matched
|
double[] |
getMuest()
Returns the attributes(array of values)
|
int |
getNatributos()
Returns the number of attributes of the example
|
long |
getPosFile()
Returns the position of the example inf the in-put file of data
|
void |
incrementaCubierta()
Adds one to the number of times that the example has been matched
|
void |
print()
Prints on the screen the example's content
|
void |
setAtributo(int i,
double val)
Gives value to an atribute
|
void |
setClase(int i)
Assigns the class
|
void |
setCubierta(int d)
Assign a new value for the 'n' times that the example has benn matched
|
void |
setMuest(double[] ds)
Assigns the in-puts of the data
|
void |
setPosFile(long l)
Assigns the position of the example in the in-put file of data
|
public Muestra(double[] m, int cl, int tamano)
Constructor
m
- un Vector of attributes(valores)cl
- The owner class of the datatamano
- Size of the datapublic Muestra(int tamano)
Other constructor, more easy
tamano
- The size of the data(n attributes)public int getClase()
Returns the example's class
public double[] getMuest()
Returns the attributes(array of values)
public void setClase(int i)
Assigns the class
i
- number of the classpublic void setMuest(double[] ds)
Assigns the in-puts of the data
ds
- An array of values for the datapublic long getPosFile()
Returns the position of the example inf the in-put file of data
public void setPosFile(long l)
Assigns the position of the example in the in-put file of data
l
- the position in the filepublic double getAtributo(int i)
Returns the value of the attribute 'i' of the example
i
- The atribute's positionpublic int getNatributos()
Returns the number of attributes of the example
public void setAtributo(int i, double val)
Gives value to an atribute
i
- Position of the attributeval
- new valuepublic void print()
Prints on the screen the example's content
public Muestra copiaMuestra()
Do a copy of the example
public boolean compara(Muestra m)
Compare if two examples are equals
m
- Example to comparepublic int getCubierta()
Returns the number of times that the example has benn matched
public void incrementaCubierta()
Adds one to the number of times that the example has been matched
public void setCubierta(int d)
Assign a new value for the 'n' times that the example has benn matched
d
- value