Examples of sub()


Examples of org.geotools.referencing.operation.matrix.GeneralMatrix.sub()

        GeneralMatrix dRx = new GeneralMatrix(3 * getMappedPositions().size(), 1);

        for (int i = 0; i < x.getNumRow(); i = i + 3) {
            GeneralMatrix subMatrix = new GeneralMatrix(3, 1);
            x.copySubMatrix(i, 0, 3, 1, 0, 0, subMatrix);
            subMatrix.sub(R, subMatrix);
            subMatrix.copySubMatrix(0, 0, 3, 1, i, 0, dRx);
        }

        return dRx;
    }
View Full Code Here

Examples of org.gephi.preview.api.Vector.sub()

    public void mouseDragged(MouseEvent e) {
        if (!previewController.sendMouseEvent(buildPreviewMouseEvent(e, PreviewMouseEvent.Type.DRAGGED))) {
            setMoving(true);
            Vector trans = target.getTranslate();
            trans.set(e.getX(), e.getY());
            trans.sub(ref);
            trans.div(target.getScaling()); // ensure const. moving speed whatever the zoom is
            trans.add(lastMove);

            refreshLoop.refreshSketch();
        }
View Full Code Here

Examples of org.gephi.preview.util.Vector.sub()

    /**
     * Updates the graph sheet's dimensions according to the set margin.
     */
    private void updateDimensions() {
        Vector topLeftVector = new Vector(originalTopLeft);
        topLeftVector.sub(margin, margin, 0);
        topLeft = new PointImpl(topLeftVector);

        Vector bottomRightVector = new Vector(originalBottomRight);
        bottomRightVector.add(margin, margin, 0);
        bottomRight = new PointImpl(bottomRightVector);
View Full Code Here

Examples of org.haystack.HWatch.sub()

        // map grid to ids
        HRef[] ids = gridToIds(db, req);

        // subscribe and return resulting grid
        writeGrid(writer, watch.sub(ids));
    }
}

//////////////////////////////////////////////////////////////////////////
// WatchUnsubOp
View Full Code Here

Examples of org.jblas.DoubleMatrix.sub()

 
  @Override
  protected double loss(List<SampleVector> samples) {
    DoubleMatrix x_samples = MathUtil.convertX2Matrix(samples);
        DoubleMatrix reconstruct_x = reconstruct(x_samples);
    return MatrixFunctions.powi(reconstruct_x.sub(x_samples), 2).sum();
  }
 
  @Override
  protected void gradientUpdateMiniBatch(SGDTrainConfig config, DoubleMatrix x_samples, DoubleMatrix y_samples, SGDParam curr_param) {
    int nbr_sample = x_samples.rows;
View Full Code Here

Examples of org.jbox2d.common.Vec2.sub()

    min.set(-worldExtent, 0.0f);
    Vec2 max = new Vec2();
    max.set(worldExtent, 2.0f * worldExtent);
    Vec2 c = MathUtils.clamp(c0, min, max);

    aabb.lowerBound.addLocal(c.sub(c0));
    aabb.upperBound.addLocal(c.sub(c0));
  }

  public void CreateProxy() {
    for (int i = 0; i < e_actorCount; ++i) {
View Full Code Here

Examples of org.jpox.store.mapped.expression.ScalarExpression.sub()

            {
                expr = expr.add(compileMultiplicativeExpression());
            }
            else if (p.parseChar('-'))
            {
                expr = expr.sub(compileMultiplicativeExpression());
            }
            else
            {
                break;
            }
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array.sub()

            return values_.get(iHighest);
    factor *= 2.0;
    final double vTry = P.value(pTry);
    if (vTry < values_.get(iHighest)) {
      values_.set(iHighest, vTry);
      sum_.addAssign(pTry.sub(vertices_.get(iHighest)));
      vertices_.set(iHighest, pTry);
    }
    return vTry;
  }

View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.sub()

        }

        // check normalization
        final Matrix m = eigenVectors.mul(eigenVectors.transpose());
        final Identity ID = new Identity(N);
        final double tol = norm(m.sub(ID));
        if (tol > 1.0e-15) {
                fail("Eigenvector not normalized");
            }
      }
    }
View Full Code Here

Examples of org.jquantlib.time.Date.sub()

        QL.info("Testing observability of dates using operation Date#sub()");

        final Date me = Date.todaysDate();
        final Flag f = new Flag();
        me.addObserver(f);
        me.sub(1);
        if (f.isUp()) {
            fail("Observer was notified of date change whilst it was not expected");
        }
    }
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.