org.knime.base.node.mine.subgroupminer.apriori
Class TIDItem

java.lang.Object
  extended by org.knime.base.node.mine.subgroupminer.apriori.TIDItem
All Implemented Interfaces:
Comparable<TIDItem>

public class TIDItem
extends Object
implements Comparable<TIDItem>

The TIDItem consists of an id and a BitSet, where each bit corresponds to a transaction id and is set, if this item is present in the transaction.

Author:
Fabian Dill, University of Konstanz

Constructor Summary
TIDItem(int id)
          Creates an TIDItem with this id and present in no transaction.
 
Method Summary
 void addTID(int tid)
          Adds a transaction id to this item, thus, the item has to be present in this transaction.
 TIDItem clone()
          
 int compareTo(TIDItem theOther)
           
 boolean equals(Object o)
          
 int getId()
           
 int getSupport()
          The support of this item, which is the number of transaction it is present in.
 BitSet getTransactionIDs()
          The transaction ids as a bitset, where the bit is set if the item is present in the corresponding transaction.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TIDItem

public TIDItem(int id)
Creates an TIDItem with this id and present in no transaction.

Parameters:
id - the id of this item
Method Detail

getId

public int getId()
Returns:
- the id of this item.

addTID

public void addTID(int tid)
Adds a transaction id to this item, thus, the item has to be present in this transaction.

Parameters:
tid - the transaction id of the transaction this item is present in

getSupport

public int getSupport()
The support of this item, which is the number of transaction it is present in.

Returns:
the support of this item, which is the numer of transactions it is present in

getTransactionIDs

public BitSet getTransactionIDs()
The transaction ids as a bitset, where the bit is set if the item is present in the corresponding transaction.

Returns:
the ids of the transactions this item appears in

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

clone

public TIDItem clone()

Overrides:
clone in class Object

compareTo

public int compareTo(TIDItem theOther)
Specified by:
compareTo in interface Comparable<TIDItem>
Parameters:
theOther - the object to compare to
Returns:
-1 if this is smaller, 0 if it is equal to the other and +1 if this is greater

toString

public String toString()

Overrides:
toString in class Object


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.