Example #1
0
 /**
  * This method creates a copy of the sequence and add a given item to the last itemset of the
  * sequence. It sets the support of the sequence as the support of the item.
  *
  * @param prefix the sequence
  * @param item the item
  * @return the new sequence
  */
 private SequentialPattern appendItemToPrefixOfSequence(SequentialPattern prefix, Integer item) {
   SequentialPattern newPrefix = prefix.cloneSequence();
   // add to the last itemset
   Itemset itemset = newPrefix.get(newPrefix.size() - 1);
   itemset.addItem(item);
   return newPrefix;
 }
 /**
  * This method creates a copy of the sequence and add a given item to the last itemset of the
  * sequence. It sets the support of the sequence as the support of the item.
  *
  * @param prefix the sequence
  * @param item the item
  * @return the new sequence
  */
 private SequentialPattern appendItemToPrefixOfSequence(SequentialPattern prefix, String item) {
   SequentialPattern newPrefix = prefix.cloneSequence();
   Itemset itemset = newPrefix.get(newPrefix.size() - 1);
   itemset.addItem(item);
   return newPrefix;
 }
Example #3
0
 /**
  * This method creates a copy of the sequence and add a given item as a new itemset to the
  * sequence. It sets the support of the sequence as the support of the item.
  *
  * @param prefix the sequence
  * @param item the item
  * @return the new sequence
  */
 private SequentialPattern appendItemToSequence(SequentialPattern prefix, Integer item) {
   SequentialPattern newPrefix = prefix.cloneSequence(); // isSuffix
   newPrefix.addItemset(new Itemset(item));
   return newPrefix;
 }
 /**
  * This method creates a copy of the sequence and add a given item as a new itemset to the
  * sequence. It sets the support of the sequence as the support of the item.
  *
  * @param prefix the sequence
  * @param item the item
  * @return the new sequence
  */
 private SequentialPattern appendItemToSequence(SequentialPattern prefix, String item) {
   SequentialPattern newPrefix = prefix.cloneSequence();
   newPrefix.addItemset(new Itemset(item));
   return newPrefix;
 }