Examples of Diamond


Examples of ca.ucalgary.ispia.rebac.Diamond

   

    else if (policy instanceof Diamond){

      Diamond temp = (Diamond) policy;

      free_vars = findFreeVars(temp.getPolicy(), free_vars);

    }

   

    else if (policy instanceof Bind){

      Bind temp = (Bind) policy;

      findFreeVars(temp.getPolicy(), free_vars);

      free_vars.remove(temp.getVariable());

    }

   

    else if (policy instanceof At){

      At temp = (At) policy;

      findFreeVars(temp.getPolicy(), free_vars);

      free_vars.add(temp.getVariable());

    }

    return free_vars;
View Full Code Here

Examples of main.ch.morrolan.gibb.snake.Diamond

import main.ch.morrolan.gibb.snake.Painter;

@RunWith(JUnit4.class)
public class DiamondTest {
    public Diamond diamond1() {
        return new Diamond(0, 0);
    }
View Full Code Here

Examples of main.ch.morrolan.gibb.snake.Diamond

    public Diamond diamond1() {
        return new Diamond(0, 0);
    }

    public Diamond diamond2() {
        return new Diamond(7, 2);
    }
View Full Code Here

Examples of main.ch.morrolan.gibb.snake.Diamond

    }


    @Test
    public void draw() {
        Diamond bodyPart;
        Painter painter;

        bodyPart = diamond1();
        painter = painterMock();
        painter.graphics = gMock();
        bodyPart.draw(painter);
        double[] xCoordinates = {0.5, 1, 0.5, 0};
        double[] yCoordinates = {0, 0.5, 1, 0.5};
        verify(painter).fillPolygon(xCoordinates, yCoordinates);

        for (int i = 0; i <= 2; i++) {
            verify(painter).drawLine(xCoordinates[i], yCoordinates[i], xCoordinates[i+1], yCoordinates[i+1]);
        }

        bodyPart = diamond2();
        painter = painterMock();
        painter.graphics = gMock();
        bodyPart.draw(painter);
        xCoordinates = new double[] {7.5, 8, 7.5, 7};
        yCoordinates = new double[] {2, 2.5, 3, 2.5};
        verify(painter).fillPolygon(xCoordinates, yCoordinates);

        for (int i = 0; i <= 2; i++) {
View Full Code Here

Examples of opennlp.ccg.hylo.Diamond

          if(parent != null) {
            g.highestAncestorMap.put(source, g.findVertexByNominal(parent));
          }
        }
        else if(isRelPred(so)) {
          Diamond d = (Diamond)so.getArg();
         
          Nominal dArg = (Nominal)d.getArg();
          LFVertex target = g.findVertexByNominal(dArg);
         
          if(target == null) {
            target = new LFVertex(dArg);
            g.addVertex(target);
          }
         
          g.addLabeledEdge(source, target, LFEdgeLabel.forMode(d.getMode()));
        }
        else if(isAttrPred(so)) {
          Diamond d = (Diamond)so.getArg();
          source.addAttribute(d.getMode(), (Proposition)d.getArg());
        }
      }
    }
   
    return g;
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.