Exemplo n.º 1
0
 /**
  * Add the pairs obtained from the Cartesian product of transactions and items
  *
  * @param trans collection of transactions
  * @param item the given item
  * @return <code>true</code> if the set set has been changed
  */
 public boolean addAll(Collection<T> trans, I item) {
   if (trans == null || trans.isEmpty() || item == null) return false;
   return matrix.addAll(allTransactions.convert(trans).indices(), itemToIndex(item));
 }
Exemplo n.º 2
0
 /**
  * Add the pairs obtained from the Cartesian product of transactions and items
  *
  * @param trans collection of transactions
  * @param items collection of items
  * @return <code>true</code> if the set set has been changed
  */
 public boolean addAll(Collection<T> trans, Collection<I> items) {
   if (trans == null || trans.isEmpty() || items == null || items.isEmpty()) return false;
   return matrix.addAll(
       allTransactions.convert(trans).indices(), allItems.convert(items).indices());
 }
Exemplo n.º 3
0
 /**
  * Add the pairs obtained from the Cartesian product of transactions and items
  *
  * @param trans the given transaction
  * @param items collection of items
  * @return <code>true</code> if the set set has been changed
  */
 public boolean addAll(T trans, Collection<I> items) {
   if (trans == null || items == null || items.isEmpty()) return false;
   return matrix.addAll(transactionToIndex(trans), allItems.convert(items).indices());
 }
Exemplo n.º 4
0
 /** {@inheritDoc} */
 @Override
 public boolean addAll(Collection<? extends Pair<T, I>> c) {
   return matrix.addAll(convert(c).matrix);
 }