Examples of IntDoubleProcedure


Examples of org.apache.mahout.math.function.IntDoubleProcedure

  @Override
  public void forEachNonZero(final org.apache.mahout.math.function.IntIntDoubleFunction function) {
    if (this.isNoView) {
      this.elements.forEachPair(
          new IntDoubleProcedure() {
            @Override
            public boolean apply(int key, double value) {
              int i = key / columns;
              int j = key % columns;
              double r = function.apply(i, j, value);
View Full Code Here

Examples of org.apache.mahout.math.function.IntDoubleProcedure

    if (yElements == null || zElements == null) {
      throw new IllegalStateException();
    }

    this.elements.forEachPair(
        new IntDoubleProcedure() {
          @Override
          public boolean apply(int key, double value) {
            int i = key / columns;
            int j = key % columns;
            if (transposeA) {
View Full Code Here

Examples of org.apache.mahout.math.function.IntDoubleProcedure

    }

    final PlusMult fun = PlusMult.plusMult(0);

    this.elements.forEachPair(
        new IntDoubleProcedure() {
          @Override
          public boolean apply(int key, double value) {
            int i = key / columns;
            int j = key % columns;
            fun.setMultiplicator(value * alpha);
 
View Full Code Here

Examples of org.apache.mahout.math.function.IntDoubleProcedure


  @Override
  public Vector toVector() {
    final Vector vector = new RandomAccessSparseVector(cardinality());
    elements.forEachPair(new IntDoubleProcedure() {
      @Override
      public boolean apply(int i, double v) {
        vector.setQuick(i, v);
        return true;
      }
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.