public final class InstanceAttributes
extends java.lang.Object
InstanceAttributes
This class contains the information of all the attributes in the dataset. It stores the same information in Attributes, but it is not defined as static.Attribute
Constructor and Description |
---|
InstanceAttributes()
InstanceAttributes
Class constructor.
|
InstanceAttributes(InstanceAttributes ia) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(Attribute attr)
This method adds an attribute definition.
|
boolean |
areAllDefinedAsOutputs(java.util.Vector outputNames)
This method checks if all the output names vector corresponds with
all the attributes in output vector.
|
void |
copyStaticAttributes()
copyStaticAttributes
It copies the attributes definition statically stored in Attributes class
|
Attribute |
getAttribute(int pos)
It returns the attribute being int the position passed as an argument.
|
Attribute |
getAttribute(java.lang.String _name)
It returns the attribute requested.
|
Attribute[] |
getAttributes()
It does return an array with all attributes
|
Attribute |
getInputAttribute(int pos)
It returns the input attribute being int the position passed as an argument.
|
Attribute[] |
getInputAttributes()
It does return all the input attributes
|
java.lang.String |
getInputAttributesHeader()
It does return a String with all the input attributes definition in keel
format.
|
java.lang.String |
getInputHeader()
It does return an String with the @inputs in keel format.
|
int |
getInputNumAttributes()
It return the number of input attributes in the API
|
int |
getNumAttributes()
It return the total number of attributes in the API
|
Attribute |
getOutputAttribute(int pos)
It returns the output attribute being int the position passed as an argument.
|
Attribute[] |
getOutputAttributes()
It does return all the output attributes.
|
java.lang.String |
getOutputAttributesHeader()
It does return a String with all the output attributes definition in keel
format.
|
java.lang.String |
getOutputHeader()
It does return an String with the @outputs in keel format.
|
int |
getOutputNumAttributes()
It return the number of output attributes in the API
|
java.lang.String |
getRelationName()
It gets the relation name.
|
Attribute |
getUndefinedAttribute(int pos)
It returns the undefined attribute being int the position passed as an argument.
|
Attribute[] |
getUndefinedAttributes()
It does return all the undefined attributes
|
java.lang.String |
getUndefinedAttributesHeader()
It does return a String with all the undefined attributes definition
in keel format.
|
int |
getUndefinedNumAttributes()
It return the number of undefined attributes in the API
|
boolean |
hasIntegerAttributes()
The function returns if there is any integer attribute.
|
boolean |
hasNominalAttributes()
The function returns if there is any nominal attribute
|
boolean |
hasRealAttributes()
The function returns if there is any real attribute.
|
boolean |
removeAttribute(boolean inputAtt,
int whichAtt)
It does remove an attribute.
|
void |
setRelationName(java.lang.String rel)
It sets the relation name.
|
public InstanceAttributes()
public InstanceAttributes(InstanceAttributes ia)
public void copyStaticAttributes()
public void addAttribute(Attribute attr)
attr
- is the new attribute to be added.public boolean hasNominalAttributes()
public boolean hasIntegerAttributes()
public boolean hasRealAttributes()
public Attribute getAttribute(java.lang.String _name)
_name
- is the name of the attribute.public Attribute[] getAttributes()
public Attribute getInputAttribute(int pos)
pos
- is the position of the attribute wanted.public Attribute[] getInputAttributes()
public java.lang.String getInputHeader()
public java.lang.String getInputAttributesHeader()
public Attribute[] getOutputAttributes()
public Attribute getOutputAttribute(int pos)
pos
- is the position of the attribute wanted.public java.lang.String getOutputHeader()
public java.lang.String getOutputAttributesHeader()
public Attribute getUndefinedAttribute(int pos)
pos
- is the position of the attribute wanted.public Attribute[] getUndefinedAttributes()
public java.lang.String getUndefinedAttributesHeader()
public Attribute getAttribute(int pos)
pos
- is the position of the attribute wanted.public int getNumAttributes()
public int getInputNumAttributes()
public int getOutputNumAttributes()
public int getUndefinedNumAttributes()
public boolean areAllDefinedAsOutputs(java.util.Vector outputNames)
outputNames
- is a vector with all output attribute names.public void setRelationName(java.lang.String rel)
rel
- is the name to be set to the relationNamepublic java.lang.String getRelationName()
public boolean removeAttribute(boolean inputAtt, int whichAtt)
inputAtt
- is a boolean that indicates if the attribute to be removed
is an input attributewhichAtt
- is an integer that indicates the position of the attribute
to be removed.