Documentation of 'ca.pfv.spmf.algorithms.frequentpatterns.two_phase.TransactionTP' Java class
TransactionTP
ca.pfv.spmf.algorithms.frequentpatterns.two_phase

Class TransactionTP



  • public class TransactionTP
    extends java.lang.Object
    This class represents a transaction (a set of items) from a transaction database with utility values, as used by the Two-Phase algorithm for high utility itemset mining.
    See Also:
    AlgoTwoPhase, UtilityTransactionDatabaseTP
    • Constructor Summary

      Constructors 
      Constructor and Description
      TransactionTP(java.util.List<java.lang.Integer> items, java.util.List<java.lang.Integer> itemsUtilities, int transactionUtility)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean contains(int item)
      Check if this transaction contains an item.
      boolean contains(java.lang.Integer item)
      Check if this transaction contains an item.
      java.lang.Integer get(int index)
      Get the item at a given position.
      java.util.List<java.lang.Integer> getItems()
      Get the list of items.
      java.util.List<java.lang.Integer> getItemsUtilities()
      Get the item utilities for this transaction.
      int getTransactionUtility()
      Get the transaction utility of this transaction.
      void print()
      Print the transaction to System.out
      int size()
      Get the number of items in this transaction.
      java.lang.String toString()
      Return a string representation of this transaction.
      • Methods inherited from class java.lang.Object

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

      • TransactionTP

        public TransactionTP(java.util.List<java.lang.Integer> items,
                             java.util.List<java.lang.Integer> itemsUtilities,
                             int transactionUtility)
        Constructor
        Parameters:
        items - list of items
        itemsUtilities - list of corresponding utility values
        transactionUtility - the transaction utility
    • Method Detail

      • getItems

        public java.util.List<java.lang.Integer> getItems()
        Get the list of items.
        Returns:
        a list of items (Integer)
      • get

        public java.lang.Integer get(int index)
        Get the item at a given position.
        Parameters:
        index - the position
        Returns:
        the item
      • print

        public void print()
        Print the transaction to System.out
      • toString

        public java.lang.String toString()
        Return a string representation of this transaction.
        Overrides:
        toString in class java.lang.Object
      • contains

        public boolean contains(java.lang.Integer item)
        Check if this transaction contains an item.
        Parameters:
        item - the given item
        Returns:
        true if yes, otherwise false.
      • contains

        public boolean contains(int item)
        Check if this transaction contains an item.
        Parameters:
        item - the given item
        Returns:
        true if yes, otherwise false.
      • size

        public int size()
        Get the number of items in this transaction.
        Returns:
        the item count
      • getItemsUtilities

        public java.util.List<java.lang.Integer> getItemsUtilities()
        Get the item utilities for this transaction.
        Returns:
        a list containing the item utilities
      • getTransactionUtility

        public int getTransactionUtility()
        Get the transaction utility of this transaction.
        Returns:
        an integer

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.