Examples of Vector


Examples of BasicDataType.Vector

  }

  public void testGetNext() {
    Map map = new Map((byte)10);
    Position currentPos = new Position();
    currentPos.setPosition(new Vector(5,5),0);
    //Position destinationPos = new Position(new Vector(2,0),0);
//    for(int y=1; y < 4; y++){
//      map.propagateOccupied((byte)1, (byte)y);
//    }
//    for(int y=1; y < 5; y++){
//      map.propagateEmpty((byte)0, (byte)y);
//    }
//    for(int x=1; x < 3; x++){
//      map.propagateEmpty((byte)x, (byte)0);
//    }
    Rect bound = new Rect(5, 6, 6,5);
    Search search = new Search(map);   
    for(int i = 0; i < 5 ; i++) {
      currentPos = search.getNext(currentPos, map, bound);
      if (currentPos == null) {
        bound.setRect(0, 9, 9, 0);
        currentPos = new Position(new Vector(5,5), 3);
        for(int j = 0; j < 5 ; j++) {
          currentPos = search.getNext(currentPos, map, bound);
          map.propagateEmpty((byte)currentPos.pos.x,(byte)currentPos.pos.y);
          map.showMap();
          System.out.println();
View Full Code Here

Examples of Kinematic.Vector

     */
    private Vector Force;

    public Ball(Pitch P) {
        OnPitch = P;
        this.Velocity = new Vector(0, 0);
        this.Acceleration = new Vector(0, 0);
        this.Force=new Vector(0, 0);
        this.setLoc(OnPitch.getCenter());
        this.animationTimer = new Timer(RefreshRate, new Ball.TimerHandler());
        this.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Soccer-Ball.png"))); // NOI18N
        this.setSize(10, 10);
    }
View Full Code Here

Examples of aima.core.util.math.Vector

  public void processError(Vector error) {
    Matrix weightUpdate = error.times(lastInput.transpose());
    layer.acceptNewWeightUpdate(weightUpdate);

    Vector biasUpdate = layer.getBiasVector().plus(error);
    layer.acceptNewBiasUpdate(biasUpdate);

  }
View Full Code Here

Examples of antlr.collections.impl.Vector

    SimpleTokenManager(String name_, Tool tool_) {
        antlrTool = tool_;
        name = name_;
        // Don't make a bigger vector than we need, because it will show up in output sets.
        vocabulary = new Vector(1);
        table = new Hashtable();

        // define EOF symbol
        TokenSymbol ts = new TokenSymbol("EOF");
        ts.setTokenType(Token.EOF_TYPE);
View Full Code Here

Examples of ch.akuhn.matrix.Vector

       * return the result to workd(ipntr(2)).  
       *
       */
      int x0 = ipntr[1-1]-1; // Fortran is off-by-one compared to Java!
      int y0 = ipntr[2-1]-1;
      Vector x = Vector.copy(workd, x0, n);
      Vector y = this.callback(x);
      assert y.size() == n;
      y.storeOn(workd, y0);  
    }
    /*
     * Either we have convergence or there is an error.
     *  
     */
 
View Full Code Here

Examples of chunmap.model.elem.Vector

    geometry = ls;
  }

  private Geometry getGeometry(CPoint p1, CPoint p2) {

    Vector v1 = new Vector(p1, p2);
    Vector v2 = new Vector(new Coordinate2D(0, 0), new Coordinate2D(0, 1));
    double angle = v1.computeAngle(v2);
    AffineTransform transf = AffineTransform.rotate(0, 0, angle + Math.PI
        / 2d);
    AffineTransform transf2 = transf.accumulate(AffineTransform.pan(p2
        .getX(), p2.getY()));
View Full Code Here

Examples of com.barrybecker4.common.math.Vector

    public Improvement findIncrementalImprovement(Optimizee optimizee, double jumpSize,
                                                  Improvement lastImprovement, Set<ParameterArray> cache) {

        NumericParameterArray currentParams = this;
        double oldFitness = currentParams.getFitness();
        Vector oldGradient = null;
        if (lastImprovement != null) {
            oldFitness = lastImprovement.getParams().getFitness();
            oldGradient = lastImprovement.getGradient();
        }
View Full Code Here

Examples of com.digitalpebble.classification.Vector

            int label = doc.getLabel();
            // get a vector from the document
            // need a metric (e.g. relative frequency / binary)
            // and a lexicon
            // the vector is represented as a string directly
            Vector vector = doc.getFeatureVector(lexicon);
            out.print(label + " " + Utils.getVectorString(vector) + "\n");
        }
        out.close();
        return vectorFile;
    }
View Full Code Here

Examples of com.enterprisemath.math.algebra.Vector

        // calculates first and second central momentum
        double[] m1 = new double[dimension];
        double[] m2 = new double[dimension];
        ObservationIterator<Vector> iterator = observations.getIterator();
        while (iterator.isNextAvailable()) {
            Vector x = iterator.getNext();
            for (int i = 0; i < dimension; ++i) {
                m1[i] += x.getComponent(i);
                m2[i] += x.getComponent(i) * x.getComponent(i);
            }
        }

        for (int i = 0; i < dimension; ++i) {
            m1[i] /= iterator.getNumIterated();
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.physics.Vector

      FixtureDef triFixD=new FixtureDef();
      FixtureDef recFixD=new FixtureDef();
      PolygonShape triShape=new PolygonShape();
      PolygonShape recShape=new PolygonShape();
     
      Vector[] verticesP=new Vector[]{new Vector(rSin15,rCos15),new Vector(radius,0),new Vector(rSin15,-rCos15)};
      Vec2[] verticesW=new Vec2[3];
      for(int i=0;i<3;i++){
        verticesW[i]=CoordinateConverter.vectorPixelToWorld(verticesP[i]);
      }
      triShape.set(verticesW, verticesW.length);
      recShape.setAsBox(CoordinateConverter.scalerPixelsToWorld(hw),
          CoordinateConverter.scalerPixelsToWorld(radius*0.6) ,
          CoordinateConverter.vectorPixelToWorld(new Vector(rSin15-hw,0)),0);
     
      triFixD.isSensor=true;
      recFixD.isSensor=true;
      triFixD.shape=triShape;
      recFixD.shape=recShape;
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.