程序包 weka.core
类 AttributeLocator
java.lang.Object
weka.core.AttributeLocator
- 所有已实现的接口:
Serializable
,Comparable<AttributeLocator>
,RevisionHandler
- 直接已知子类:
RelationalLocator
,StringLocator
public class AttributeLocator
extends Object
implements Serializable, Comparable<AttributeLocator>, RevisionHandler
This class locates and records the indices of a certain type of attributes,
recursively in case of Relational attributes.
- 版本:
- $Revision: 8034 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器构造器说明AttributeLocator
(Instances data, int type) Initializes the AttributeLocator with the given data for the specified type of attribute.AttributeLocator
(Instances data, int type, int[] indices) initializes the AttributeLocator with the given data for the specified type of attribute.AttributeLocator
(Instances data, int type, int fromIndex, int toIndex) Initializes the AttributeLocator with the given data for the specified type of attribute. -
方法概要
修饰符和类型方法说明int
Compares this object with the specified object for order.boolean
Indicates whether some other object is "equal to" this one.int
getActualIndex
(int index) returns actual index in the Instances object.int[]
returns the indices that are allowed to check for the attribute typeint[]
Returns the indices of the attributes.getData()
returns the underlying datagetLocator
(int index) Returns the AttributeLocator at the given index.int[]
Returns the indices of the AttributeLocator objects.Returns the revision string.int
getType()
returns the type of attribute that is locatedtoString()
returns a string representation of this object
-
构造器详细资料
-
AttributeLocator
Initializes the AttributeLocator with the given data for the specified type of attribute. Checks all attributes.- 参数:
data
- the data to work ontype
- the type of attribute to locate
-
AttributeLocator
Initializes the AttributeLocator with the given data for the specified type of attribute. Checks only the given range.- 参数:
data
- the data to work ontype
- the type of attribute to locatefromIndex
- the first index to inspect (including)toIndex
- the last index to check (including)
-
AttributeLocator
initializes the AttributeLocator with the given data for the specified type of attribute. Checks only the given attribute indices.- 参数:
data
- the data to work ontype
- the type of attribute to locateindices
- the attribute indices to check
-
-
方法详细资料
-
getType
public int getType()returns the type of attribute that is located- 返回:
- the type of attribute
-
getAllowedIndices
public int[] getAllowedIndices()returns the indices that are allowed to check for the attribute type- 返回:
- the indices that are checked for the attribute type
-
getData
returns the underlying data- 返回:
- the underlying Instances object
-
getActualIndex
public int getActualIndex(int index) returns actual index in the Instances object.- 参数:
index
- the index in the m_AllowedIndices array- 返回:
- the actual index in the instances object
-
getAttributeIndices
public int[] getAttributeIndices()Returns the indices of the attributes. These indices are referring to the m_AllowedIndices array, not the actual indices in the Instances object.- 返回:
- the indices of the attributes
- 另请参阅:
-
getLocatorIndices
public int[] getLocatorIndices()Returns the indices of the AttributeLocator objects. These indices are referring to the m_AllowedIndices array, not the actual indices in the Instances object.- 返回:
- the indices of the AttributeLocator objects
- 另请参阅:
-
getLocator
Returns the AttributeLocator at the given index. This index refers to the index of the m_AllowedIndices array, not the actual Instances object.- 参数:
index
- the index of the locator to retrieve- 返回:
- the AttributeLocator at the given index
-
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. Only type and indices are checked.- 指定者:
compareTo
在接口中Comparable<AttributeLocator>
- 参数:
o
- the object to compare with- 返回:
- -1 if less than, 0 if equal, +1 if greater than the given object
-
equals
Indicates whether some other object is "equal to" this one. Only type and indices are checked. -
toString
returns a string representation of this object -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-