Examples of reduce()


Examples of org.apache.mahout.math.hadoop.similarity.RowSimilarityJob.EntriesToVectorsReducer.reduce()

    EasyMock.replay(context);

    EntriesToVectorsReducer reducer = new EntriesToVectorsReducer();
    setField(reducer, "maxSimilaritiesPerRow", 1);

    reducer.reduce(new SimilarityMatrixEntryKey(12, 1.0), Arrays.asList(
        MathHelper.matrixEntry(12, 34, 0.8),
        MathHelper.matrixEntry(12, 56, 0.7)), context);

    EasyMock.verify(context);
View Full Code Here

Examples of org.apache.mahout.math.hadoop.similarity.RowSimilarityJob.SimilarityReducer.reduce()

    EasyMock.replay(context);

    SimilarityReducer reducer = new SimilarityReducer();
    setField(reducer, "similarity", new DistributedTanimotoCoefficientVectorSimilarity());

    reducer.reduce(new WeightedRowPair(12, 34, 3.0, 3.0), Arrays.asList(new Cooccurrence(56, 1.0, 2.0),
        new Cooccurrence(78, 3.0, 6.0)), context);

    EasyMock.verify(context);
  }
View Full Code Here

Examples of org.apache.mahout.math.hadoop.similarity.RowSimilarityJob.SimilarityReducer.reduce()

    EasyMock.replay(context);

    SimilarityReducer reducer = new SimilarityReducer();
    setField(reducer, "similarity", new DistributedTanimotoCoefficientVectorSimilarity());

    reducer.reduce(new WeightedRowPair(90, 90, 2.0, 2.0), Arrays.asList(new Cooccurrence(56, 1.0, 2.0),
        new Cooccurrence(78, 3.0, 6.0)), context);

    EasyMock.verify(context);
  }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.reduce()

      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }

  /**
   * @generated
   */
 
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.reduce()

      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }

  /**
   * @generated
   */
 
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.reduce()

      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }

  /**
   * @generated
   */
 
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.reduce()

      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }

  /**
   * @generated
   */
 
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.reduce()

    if (cmd != null && cmd.canExecute()) {
      SetViewMutabilityCommand.makeMutable(
          new EObjectAdapter(host().getNotationView())).execute();
      executeCommand(cmd);
      if (boundsCommand.canExecute()) {
        executeCommand(new ICommandProxy(boundsCommand.reduce()));
      }
      @SuppressWarnings("unchecked")
      List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
      createdViews.addAll(nl);
    }
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.reduce()

      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }

}
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.reduce()

      // delete host element
      cmd.add(new DestroyElementCommand(req));
    } else {
      cmd.add(new DeleteCommand(getEditingDomain(), view));
    }
    return getGEFWrapper(cmd.reduce());
  }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.