Documentation of 'ca.pfv.spmf.algorithms.sequentialpatterns.gsp_AGP.items.Itemset' Java class
Itemset
ca.pfv.spmf.algorithms.sequentialpatterns.gsp_AGP.items

Class Itemset



  • public final class Itemset
    extends java.lang.Object
    This class represents an itemset from a sequence. The itemset consists of a list of items and an timestamp that denotes when the itemset occurs. An itemset with timestamp is also called "transaction" Copyright Antonio Gomariz Peñalver 2013 This file is part of the SPMF DATA MINING SOFTWARE (http://www.philippe-fournier-viger.com/spmf). SPMF is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SPMF is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SPMF. If not, see .
    • Constructor Summary

      Constructors 
      Constructor and Description
      Itemset()
      Standard constructor.
      Itemset(java.util.Collection<Item> collection, long timestamp)
      Constructor from a collection of items and a timestamp
      Itemset(Item[] collection, long timestamp)
      Constructor from an array of items and a timestamp
      Itemset(Item item, long timestamp)
      Constructor from an item and a timestamp
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addItem(int index, Item value)
      Adds an item in the specified position of the itemset
      void addItem(Item value)
      Adds an item in the last position of the itemset
      Itemset cloneItemset()
      It clones the current itemset.
      Item get(int index)
      It returns the item that can be found at the specified index in this itemset
      java.util.List<Item> getItems()
      It returns the item list for this itemset
      long getTimestamp() 
      Item removeItem(int index)
      It removes the item that is in the specified index
      boolean removeItem(Item item)
      It removes the specified item
      void setTimestamp(long timestamp) 
      int size()
      It gives the number of items that compose the itemset
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • Itemset

        public Itemset(Item item,
                       long timestamp)
        Constructor from an item and a timestamp
        Parameters:
        item -
        timestamp -
      • Itemset

        public Itemset(java.util.Collection<Item> collection,
                       long timestamp)
        Constructor from a collection of items and a timestamp
        Parameters:
        collection -
        timestamp -
      • Itemset

        public Itemset(Item[] collection,
                       long timestamp)
        Constructor from an array of items and a timestamp
        Parameters:
        collection -
        timestamp -
      • Itemset

        public Itemset()
        Standard constructor. The itemlist is initialized to empty and the timestamp set to 0
    • Method Detail

      • addItem

        public void addItem(Item value)
        Adds an item in the last position of the itemset
        Parameters:
        value - item to add
      • addItem

        public void addItem(int index,
                            Item value)
        Adds an item in the specified position of the itemset
        Parameters:
        index - index in the itemset where we want to insert the item
        value - item to add
      • removeItem

        public boolean removeItem(Item item)
        It removes the specified item
        Parameters:
        item -
      • removeItem

        public Item removeItem(int index)
        It removes the item that is in the specified index
        Parameters:
        index -
      • getItems

        public java.util.List<Item> getItems()
        It returns the item list for this itemset
        Returns:
        the list of items in this itemset
      • get

        public Item get(int index)
        It returns the item that can be found at the specified index in this itemset
        Parameters:
        index - the item index
        Returns:
        the item
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • cloneItemset

        public Itemset cloneItemset()
        It clones the current itemset.
        Returns:
        the clone of the current itemset.
      • getTimestamp

        public long getTimestamp()
      • setTimestamp

        public void setTimestamp(long timestamp)
      • size

        public int size()
        It gives the number of items that compose the itemset
        Returns:
        the number of items.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.