类 Element
java.lang.Object
weka.associations.gsp.Element
- 所有已实现的接口:
Serializable
,Cloneable
,RevisionHandler
Class representing an Element, i.e., a set of events/items.
- 版本:
- $Revision: 1.2 $
- 作者:
- Sebastian Beer
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明clone()
Returns a deep clone of an Element.boolean
Checks if an Element contains over one event.void
deleteEvent
(String position) Deletes the first or last event of an Element.boolean
Checks if two Elements are equal.int[]
Returns the events Array of an Element.static FastVector
getOneElements
(Instances instances) Returns all events of the given data set as Elements containing a single event.Returns the revision string.boolean
isContainedBy
(Instance instance) Checks if an Element is contained by a given Instance.boolean
isEmpty()
Checks if the Element contains any events.static Element
Merges two Elements into one.toNominalString
(Instances dataSet) Returns a String representation of an Element where the numeric value of each event/item is represented by its respective nominal value.toString()
Returns a String representation of an Element.
-
构造器详细资料
-
Element
public Element()Constructor -
Element
public Element(int size) Constructor accepting an initial size of the events Array as parameter.- 参数:
size
- the size
-
-
方法详细资料
-
getOneElements
Returns all events of the given data set as Elements containing a single event. The order of events is determined by the header information of the corresponding ARFF file.- 参数:
instances
- the data set- 返回:
- the set of 1-Elements
-
merge
Merges two Elements into one.- 参数:
element1
- first Elementelement2
- second Element- 返回:
- the merged Element
-
clone
Returns a deep clone of an Element.- 返回:
- the cloned Element
-
containsOverOneEvent
public boolean containsOverOneEvent()Checks if an Element contains over one event.- 返回:
- true, if the Element contains over one event, else false
-
deleteEvent
Deletes the first or last event of an Element.- 参数:
position
- the position of the event to be deleted (first or last)
-
equals
Checks if two Elements are equal. -
getEvents
public int[] getEvents()Returns the events Array of an Element.- 返回:
- the events Array
-
isContainedBy
Checks if an Element is contained by a given Instance.- 参数:
instance
- the given Instance- 返回:
- true, if the Instance contains the Element, else false
-
isEmpty
public boolean isEmpty()Checks if the Element contains any events.- 返回:
- true, if the Element contains no event, else false
-
toNominalString
Returns a String representation of an Element where the numeric value of each event/item is represented by its respective nominal value.- 参数:
dataSet
- the corresponding data set containing the header information- 返回:
- the String representation
-
toString
Returns a String representation of an Element. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-