Examples of apply()


Examples of com.vividsolutions.jts.geom.Polygon.apply()

        // compute the translation
        double dx = de.getMinX() - re.getMinX();
        double dy = de.getMinY() - re.getMinY();

        Polygon cloned = (Polygon) displaced.clone();
        cloned.apply(AffineTransformation.translationInstance(-dx, -dy));
        if (1 - new HausdorffSimilarityMeasure().measure(cloned, reference) > EPS) {
            return null;
        } else {
            return new double[] { dx, dy };
        }
View Full Code Here

Examples of com.volantis.mcs.protocols.css.emulator.renderer.StyleEmulationPropertyRenderer.apply()

        StyleValue value = MCSImageSavingKeywords.DEFAULT;

        StyleEmulationPropertyRenderer renderer =
                new WMLImageAltEmulationPropertyRenderer();
        renderer.apply(img, value);

        assertEquals("Markup should match", "<img/>",
                     DOMUtilities.toString(img));
    }
View Full Code Here

Examples of crazypants.render.VertexRotation.apply()

            float zOffset = 0.52f * (1 - dir.offsetZ) (dir.offsetZ * (-0.1F + rand.nextFloat() * 0.2F));

            if(rand.nextFloat() > 0.5) {
              VertexRotation vr = new VertexRotation(Math.PI/4, new Vector3d(0,1,0), new Vector3d(0.5,0.25,0.5));
              Vector3d vec = new Vector3d(xOffset, yOffset, zOffset);
              vr.apply(vec);
              xOffset = (float)vec.x;
              yOffset = (float)vec.y;
              zOffset = (float)vec.z;

            }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.whiteboard.sxe.records.ElementRecord.apply()

      ISXERecordFactory recordFactory) {

    SXEController controller = new SXEController(recordFactory);
    DocumentRecord document = recordFactory.createDocument(controller);
    ElementRecord root = recordFactory.createRoot(document);
    root.apply(document);

    return document;
  }

}
View Full Code Here

Examples of de.fu_berlin.inf.dpp.whiteboard.sxe.records.SetRecord.apply()

  protected void applyNullRecord(SetRecord toConflict) {
    SetRecord setRecord = new SetRecord(toConflict.getTarget(),
        toConflict.getVersion());
    // let's apply the conflict locally, too, to ensure a same version
    setRecord.apply(document);
  }

  /**
   * This method sends a SetRecord to all peers that conflicts with the
   * provided one so that this will be reverted to a previous version. This
View Full Code Here

Examples of de.hpi.eworld.gui.util.Pen.apply()

  @Override
  public void paint(mxGraphics2DCanvas canvas, mxCellState state) {
    canvas.getGraphics().setBackground(getFillColor(null, null));
    Pen pen = new Pen(getStrokeColor(null, null));
    pen.apply(canvas.getGraphics());
    canvas.getGraphics().translate(state.getX(), state.getY());
    canvas.getGraphics().draw(shape);
  }

  @Override
View Full Code Here

Examples of de.innovationgate.eclipse.utils.ui.DefaultedText.apply()

    GridData innerGrpData = new GridData(GridData.FILL_HORIZONTAL);
    label = new Label(_grpCreateContentStore, SWT.NONE);
    label.setText("Database key:");
    _txtDatabaseKey = new Text(_grpCreateContentStore, SWT.BORDER);
    DefaultedText dflHandler = new DefaultedText(DEFAULT_DBKEY);
    dflHandler.apply(_txtDatabaseKey);
    _txtDatabaseKey.setLayoutData(GridDataFactory.copyData(innerGrpData));
    _txtDatabaseKey.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        dialogChanged(e);
View Full Code Here

Examples of de.jungblut.math.DoubleVector.apply()

    double loss = 0d;
    for (Tuple<DoubleVector, DoubleVector> dx : data) {
      DoubleVector prediction = reg.predict(dx.getFirst());
      prediction = new DenseDoubleVector(
          prediction.apply(new DoubleVectorFunction() {

            @Override
            public double calculate(int index, double value) {
              return value > 0.5 ? 1d : 0d;
            }
View Full Code Here

Examples of de.lessvoid.nifty.loaderv2.types.apply.ApplyRenderer.apply()

    this.focusable = attributes.getAsBoolean("focusable", Convert.DEFAULT_FOCUSABLE);
    this.focusableInsertBeforeElementId = attributes.get("focusableInsertBeforeElementId");
    for (int i=0; i<elementRenderer.length; i++) {
      ElementRenderer renderer = elementRenderer[i];
      ApplyRenderer rendererApply = rendererApplier.get(renderer.getClass());
      rendererApply.apply(this, attributes, renderEngine);
    }
  }

  public void initializeFromPostAttributes(final Attributes attributes) {
    boolean visible = attributes.getAsBoolean("visible", Convert.DEFAULT_VISIBLE);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation.apply()

    // index in reference array
    int idx = 0;
    // with 0 arguments
    {
      AffineTransformation aff = AffineTransformation.reorderAxesTransformation(v.getDimensionality(), new int[] {});
      Vector n = aff.apply(v).minus(ps[idx]);
      assertEquals("Permutation " + idx + " doesn't match.", n.euclideanLength(), 0.0, 0.001);
      idx++;
    }
    // with one argument
    for(int d1 = 1; d1 <= 3; d1++) {
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.