weka.associations.classification
Class CrList

java.lang.Object
  extended by weka.associations.classification.CrList
All Implemented Interfaces:
java.io.Serializable

public class CrList
extends java.lang.Object
implements java.io.Serializable

Class for the associated list of a CrTree. A CrTree(n-ary tree in child-sibling representation) can store classification association rules(CARs) and allows pruning and classification. Tree Structure described at: W. Li, J. Han, J.Pei: CMAR: Accurate and Efficient Classification Based on Multiple Class-Association Rules. In ICDM'01:369-376,2001.

Version:
$Revision: 8108 $
Author:
Stefan Mutter
See Also:
Serialized Form

Constructor Summary
CrList()
          Constructor that creates an empty list.
 
Method Summary
 void deleteListElement(CrListElement element)
          Deletes the CrListElement out of the CrList
 CrListElement getHead()
          Gets the head of the CrList
 CrListElement insertListElement(int num, int value, int i)
          Inserts a new element at the end of the list and returns it.
 boolean isEmpty()
          Returns whether or not the CrList is empty.
 CrListElement searchListElement(int num, int value)
          Searches for a CrListElement with the specified attribute number and attribute value.
 int[] searchListIndex(int num, int value)
          Gets the index and the minimum height of a CrListElement in a CrList
 java.lang.String toString()
          Returns a string description of the CrList
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CrList

public CrList()
Constructor that creates an empty list.

Method Detail

insertListElement

public CrListElement insertListElement(int num,
                                       int value,
                                       int i)
Inserts a new element at the end of the list and returns it.

Parameters:
num - The attribute number that is stored in a CrListElement
value - The attribute value that is stored in a CrListElement
i - the minimum height
Returns:
the inserted CrListElement

deleteListElement

public void deleteListElement(CrListElement element)
Deletes the CrListElement out of the CrList

Parameters:
element - The CrListElement to delete

isEmpty

public boolean isEmpty()
Returns whether or not the CrList is empty.

Returns:
true if the CrList is empty, false otherwise

getHead

public CrListElement getHead()
Gets the head of the CrList

Returns:
the head element of the CrList

toString

public java.lang.String toString()
Returns a string description of the CrList

Overrides:
toString in class java.lang.Object
Returns:
a string description of the CrList

searchListElement

public CrListElement searchListElement(int num,
                                       int value)
Searches for a CrListElement with the specified attribute number and attribute value.

Parameters:
num - the attribute number
value - the attribute value
Returns:
the CrListElement that stores that items, or null otherwise

searchListIndex

public int[] searchListIndex(int num,
                             int value)
Gets the index and the minimum height of a CrListElement in a CrList

Parameters:
num - the attribute number
value - the attribute value
Returns:
an integer array containing the list index and the minimum height of the CRListElement that stores the item. If no CrListElement is found the array contains two zeros.