Documentation of 'ca.pfv.spmf.input.transaction_database_list_integers.TransactionDatabase' Java class
TransactionDatabase
ca.pfv.spmf.input.transaction_database_list_integers

Class TransactionDatabase



  • public class TransactionDatabase
    extends java.lang.Object
    This class represents a transaction database (a.k.a. binary context), implemented as a list of integers. It can read a transaction database directly from a file. See the ca.pfv.spmf.test folder for some examples of files that can be read.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addTransaction(java.util.List<java.lang.Integer> transaction)
      Method to add a new transaction to this database.
      java.util.Set<java.lang.Integer> getItems()
      Get the set of items contained in this database.
      java.util.List<java.util.List<java.lang.Integer>> getTransactions()
      Get the list of transactions in this database
      void loadFile(java.lang.String path)
      Method to load a file containing a transaction database into memory
      void printDatabase()
      Method to print the content of the transaction database to the console.
      int size()
      Get the number of transactions in this transaction database.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TransactionDatabase

        public TransactionDatabase()
    • Method Detail

      • addTransaction

        public void addTransaction(java.util.List<java.lang.Integer> transaction)
        Method to add a new transaction to this database.
        Parameters:
        transaction - the transaction to be added
      • loadFile

        public void loadFile(java.lang.String path)
                      throws java.io.IOException
        Method to load a file containing a transaction database into memory
        Parameters:
        path - the path of the file
        Throws:
        java.io.IOException - exception if error reading the file
      • printDatabase

        public void printDatabase()
        Method to print the content of the transaction database to the console.
      • size

        public int size()
        Get the number of transactions in this transaction database.
        Returns:
        the number of transactions.
      • getTransactions

        public java.util.List<java.util.List<java.lang.Integer>> getTransactions()
        Get the list of transactions in this database
        Returns:
        A list of transactions (a transaction is a list of Integer).
      • getItems

        public java.util.Set<java.lang.Integer> getItems()
        Get the set of items contained in this database.
        Returns:
        The set of items.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.