Examples of Vector


Examples of edu.ucla.sspace.vector.Vector

     */
    public SortedMultiMap<Double,String> getMostSimilar(
            final String word, final SemanticSpace sspace,
            int numberOfSimilarWords, Similarity.SimType similarityType) {

        Vector v = sspace.getVector(word);

        // if the semantic space did not have the word, then return null
        if (v == null) {
            return null;
        }
       
        final Vector vector = v;

        Set<String> words = sspace.getWords();
       
        // the most-similar set will automatically retain only a fixed number
        // of elements
View Full Code Here

Examples of engine.geometry.Vector

        this.dynamic = dynamic;
    }

    @Override
    protected void onBeforeMove(Keyboard keyboard, Mouse mouse, Clock clock) {
        dynamic.applyImpulse(new Vector(0, dynamic.getMass() * GRAVITY));
    }
View Full Code Here

Examples of es.iiia.shapegrammar.utils.Vector

        return getRatio(this.intersection, pointA, pointB);
    }

    private static double getRatio(Point2D intersection, Point2D pointA, Point2D pointB) {
        try {
            Vector t1 = new Vector(pointA, intersection);
            Vector t2 = new Vector(pointB, intersection);

            double norm1 = Math.sqrt(t1.x * t1.x + t1.y * t1.y);
            double norm2 = Math.sqrt(t2.x * t2.x + t2.y * t2.y);

            return MathUtils.round(norm1 / norm2);
View Full Code Here

Examples of flex2.compiler.mxml.rep.Vector

    /*
     * TODO should take vector element type and use when processing text initializer, etc.
     */
    public void createVectorModel(int line, boolean fixed)
    {
        vector = new Vector(document, parent, line, getElementType(), fixed);
        vector.setParentIndex(getName(), getStateName());
    }
View Full Code Here

Examples of fork.lib.math.algebra.advanced.linearalgebra.Vector

    jj.initEmptyRow(new ReadTable(fa).getColumn(0));
   
    jj.addTextFile(fa);
    jj.addTextFile(fb);
   
    Vector va= new Vector(FormatOp1D.stringToDouble(jj.tab.getColumn(0)));
    Vector vb= new Vector(FormatOp1D.stringToDouble(jj.tab.getColumn(1)));
    Vector vc= va.divideByVector(vb);
    jj.addElementsAnyway(FormatOp1D.doubleToArrayDouble(vc.getDoubles()), "ratio");
   
    int[] inds= Algebra1D.getReversedIndexForOrigin(vc.getDoubles());
    jj.tab.reorderRows(inds);
   
   
    jj.writeToFile(new File(d+"/combine_"+size+".txt"));
}
View Full Code Here

Examples of gov.sandia.cognition.math.matrix.Vector

  public <N, H extends GenericHMM<N,?,?>, T extends HmmTransitionState<N, H>> void evaluate(
      int replication, SimHmmObservedValue<Vector, Vector> obs,
      DataDistribution<T> distribution) {

    final Vector trueState = obs.getState();
    RingAccumulator<Vector> stateMean = new RingAccumulator<Vector>();
    // rediculous hack to get around java bug
    for (T particle : distribution.getDomain()) {
      final double particleWeight = distribution.getFraction(particle);
      Object tmpParticle = particle;
View Full Code Here

Examples of graphics.common.Vector

                     p2.getY() - p1.getY(),
                     p2.getZ() - p1.getZ() );
    }

    public static Vector crossProduct( Vector v1, Vector v2 ) {
        Vector ret = get();
        ret.setXPart( v1.getYPart() * v2.getZPart() - v1.getZPart() * v2.getYPart() );
        ret.setYPart( v1.getZPart() * v2.getXPart() - v1.getXPart() * v2.getZPart() );
        ret.setZPart( v1.getXPart() * v2.getYPart() - v1.getYPart() * v2.getXPart() );
        return ret;
    }
View Full Code Here

Examples of java.util.Vector

       @param sender The sender of the message
       @param seqno The sequence number associated with the message
       @return boolean If false, message is already present. Otherwise true.
     */
    public boolean add(Object sender, long seqno) {
    Vector seqnos=(Vector)msgs.get(sender);
    Long   val=new Long(seqno);

    if(seqnos == null) {
        seqnos=new Vector();
        seqnos.addElement(val);
        msgs.put(sender, seqnos);
        return true;
    }

    if(seqnos.contains(val))
        return false;

    seqnos.addElement(val);
    return true;
    }
View Full Code Here

Examples of java.util.Vector

    return (ResourceXmlBean) roots.get(id);
  }

  protected static Vector getItems() {
    Enumeration elts = roots.elements();
    Vector retour = new Vector();
    while (elts.hasMoreElements()) {
      retour.add(elts.nextElement());
    }
    return retour;
  }
View Full Code Here

Examples of java.util.Vector

    // fill data
    try {
      Mapping.begin();

      Vector users = User.listAll();
      request.setAttribute("users",users);     
     
      Mapping.rollback();

    } catch (Exception e) {
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.