public class Replace
extends java.lang.Object
implements java.lang.Comparable
Constructor and Description |
---|
Replace()
Default Constructor
|
Replace(int cRule,
int dID,
int y)
Parameters Constructor
|
Modifier and Type | Method and Description |
---|---|
Replace |
clone()
Clone function.
|
int |
compareTo(java.lang.Object a)
Function to compare objects of the Structure class.
|
int |
getcRule()
It returns the position of the best rule that correctly classifies the example stored in the structure
|
int |
getdID()
It returns the position in the training dataset for the example stored in the structure
|
int |
gety()
It returns the class for the example stored in the structure
|
void |
setcRule(int cRule)
It sets the position of the best rule that correctly classifies the example stored in the structure
|
void |
setdID(int dID)
It sets in the structure the position in the training dataset of the wanted example
|
void |
sety(int y)
It sets in the structure the class of the example
|
public Replace()
public Replace(int cRule, int dID, int y)
cRule
- Position in the rule set for the rule that correctly classifies the "dID" instancedID
- Position of the correctly classified exampley
- Class of the "dID" examplepublic Replace clone()
clone
in class java.lang.Object
public int getdID()
public void setdID(int dID)
dID
- Position in the training dataset of the wanted examplepublic int gety()
public void sety(int y)
y
- Class of the examplepublic int getcRule()
public void setcRule(int cRule)
cRule
- Position of the best rule that correctly classifies the example stored in the structurepublic int compareTo(java.lang.Object a)
compareTo
in interface java.lang.Comparable
a
- Replace object to compare with.