Examples of nearest()


Examples of com.nr.cg.KDtree.nearest()

    double dis2sq;
    localflag=false;
    for (i=0;i<M;i++) {
      y.x[0]=myran.doub();
      y.x[1]=myran.doub();
      n3=tree2.nearest(y);
      dis2sq=SQR(kd2[n3].x[0]-y.x[0])+SQR(kd2[n3].x[1]-y.x[1]);
      for (j=0;j<N;j++) {
        if (j != n3) localflag = localflag ||
          (SQR(kd2[j].x[0]-y.x[0])+ SQR(kd2[j].x[1]-y.x[1])) < dis2sq;
      }
View Full Code Here

Examples of com.nr.cg.KDtree.nearest()

    localflag=false;
    for (i=0;i<M;i++) {
      yy.x[0]=myran.doub();
      yy.x[1]=myran.doub();
      yy.x[2]=myran.doub();
      n3=tree3.nearest(yy);
      dis3sq=SQR(kd3[n3].x[0]-yy.x[0])+SQR(kd3[n3].x[1]-yy.x[1])
        +SQR(kd3[n3].x[2]-yy.x[2]);
      for (j=0;j<N;j++) {
        if (j != n3) localflag = localflag ||
          (SQR(kd3[j].x[0]-yy.x[0]) + SQR(kd3[j].x[1]-yy.x[1])
View Full Code Here

Examples of net.sf.jsi.rtree.RTree.nearest()

     
      Counter counter = new Counter();
      rtree.intersects(testRect, counter);
      assertTrue(counter.count == 0);
     
      rtree.nearest(testPoint, counter, Float.MAX_VALUE);
      assertTrue(counter.count == 0);
     
      rtree.nearestN(testPoint, counter, 10, Float.MAX_VALUE);
      assertTrue(counter.count == 0);
     
View Full Code Here

Examples of org.eclipse.sapphire.Element.nearest()

       
        InputStream stream = null;
       
        if( string != null && ! string.contains( "/" ) )
        {
            final ISapphireUiDef sdef = element.nearest( ISapphireUiDef.class );
           
            if( sdef != null )
            {
                for( IPackageReference p : sdef.getImportedPackages() )
                {
View Full Code Here

Examples of org.eclipse.sapphire.Element.nearest()

                    {
                        obj = type.cast( element );
                    }
                    else
                    {
                        obj = element.nearest( type );
                    }
                }
            }
        }
       
View Full Code Here

Examples of org.eclipse.sapphire.Element.nearest()

                refreshActionState();
            }
        };
       
        final Element element = getModelElement();
        final IValuePropertyActionsGallery gallery = element.nearest( IValuePropertyActionsGallery.class );
        final String propertyName = property().name();
       
        gallery.attach( listener, "Entities/*" );
        element.attach( listener, propertyName );
       
View Full Code Here

Examples of org.eclipse.sapphire.Element.nearest()

        final Element element = getModelElement();
        final String entityName = ( (Value<?>) property() ).text();
       
        if( entityName != null && ! isEntityDefined( entityName ) )
        {
            final IValuePropertyActionsGalleryEntity entity = element.nearest( IValuePropertyActionsGallery.class ).getEntities().insert();
            entity.setName( entityName );
        }
       
        return null;
    }
View Full Code Here

Examples of org.eclipse.sapphire.Element.nearest()

        if( dialog.open() != Window.CANCEL )
        {
            final String entityName = dialog.getValue();
            final Element element = getModelElement();
           
            final IValuePropertyActionsGalleryEntity entity = element.nearest( IValuePropertyActionsGallery.class ).getEntities().insert();
            entity.setName( entityName );
           
            ( (Value<?>) property() ).write( entityName );
        }
       
View Full Code Here

Examples of org.eclipse.sapphire.samples.contacts.Contact.nearest()

        final SendContactOp op = context( SendContactOp.class );
        final Contact contact = op.getContact().content();
       
        if( contact != null )
        {
            for( Contact c : contact.nearest( ContactRepository.class ).getContacts() )
            {
                final String email = c.getEMail().text();
               
                if( email != null )
                {
View Full Code Here

Examples of org.eclipse.sapphire.samples.contacts.Contact.nearest()

    protected void compute( final Set<String> values )
    {
        values.add( "Personal" );
       
        final Contact c = context( Contact.class );
        final ContactRepository cdb = c.nearest( ContactRepository.class );
       
        if( cdb != null )
        {
            for( Contact contact : cdb.getContacts() )
            {
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.