ca.pfv.spmf.algorithms.frequentpatterns.two_phase
Class UtilityTransactionDatabaseTP
- java.lang.Object
-
- ca.pfv.spmf.algorithms.frequentpatterns.two_phase.UtilityTransactionDatabaseTP
-
public class UtilityTransactionDatabaseTP extends java.lang.ObjectThis class represents a transaction database with utility values, as used by the Two-Phase algorithm for high utility itemset mining.- See Also:
AlgoTwoPhase,TransactionTP
-
-
Constructor Summary
Constructors Constructor and Description UtilityTransactionDatabaseTP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddTransaction(TransactionTP t)Add a transaction.java.util.Set<java.lang.Integer>getAllItems()Get the set of items in this database.java.util.List<TransactionTP>getTransactions()Get the list of transactions.voidloadFile(java.lang.String path)Load a transaction database from a file.voidprintDatabase()Print this database to System.out.intsize()Get the number of transactions.
-
-
-
Method Detail
-
addTransaction
public void addTransaction(TransactionTP t)
Add a transaction.- Parameters:
t- the transaction to be added
-
loadFile
public void loadFile(java.lang.String path) throws java.io.IOExceptionLoad a transaction database from a file.- Parameters:
path- the path of the file- Throws:
java.io.IOException- exception if error while reading the file.
-
printDatabase
public void printDatabase()
Print this database to System.out.
-
size
public int size()
Get the number of transactions.- Returns:
- a int
-
getTransactions
public java.util.List<TransactionTP> getTransactions()
Get the list of transactions.- Returns:
- the list of Transactions.
-
getAllItems
public java.util.Set<java.lang.Integer> getAllItems()
Get the set of items in this database.- Returns:
- a Set of Integers
-
-
DMelt 3.0 © DataMelt by jWork.ORG