Examples of Vertex


Examples of jmt.engine.jaba.Hull.Vertex

      int b = (int) Math
          .round((serviceTimes[i][1][0] * prop * visits[i][1]));
      int c = (int) Math
          .round((serviceTimes[i][2][0] * prop * visits[i][2]));
      // System.out.println(i+": "+a+" "+b+" "+c);
      vertices.addElement(new Vertex(a, b, c));
    }
    return vertices;
  }
View Full Code Here

Examples of net.sf.graphiti.model.Vertex

        String typeName = element.getAttribute("type");
        ObjectType type = configuration.getEdgeType(typeName);

        String sourceId = element.getAttribute("source");
        Vertex source = graph.findVertex(sourceId);

        String targetId = element.getAttribute("target");
        Vertex target = graph.findVertex(targetId);

        if (source == null && target == null) {
          throw new TransformedDocumentParseError("In the edge \""
              + sourceId + "\" -> \"" + targetId + "\", \""
              + sourceId + "\" nor \"" + targetId
View Full Code Here

Examples of nz.ac.waikato.jdsl.graph.api.Vertex

    model.buildGraph();
    InspectableGraph graph = model.getGraph();
    // now check that the correct graph has been built.
    Assert.assertEquals(3, graph.numVertices());
    Assert.assertEquals(5, graph.numEdges());
    Vertex s0 = model.getVertex("0");
    Vertex s1 = model.getVertex("1");
    Vertex s2 = model.getVertex("2");
    Assert.assertNotNull(s0);
    Assert.assertNotNull(s1);
    Assert.assertNotNull(s2);
    Assert.assertEquals("0", s0.element());
    Assert.assertEquals("1", s1.element());
    Assert.assertEquals("2", s2.element());
    // we must iterate through the edges, because graph.aConnectingEdge
    // does not respect the direction of the edge!
    EdgeIterator iter = graph.edges();
    while (iter.hasNext()) {
      Edge e = iter.nextEdge();
View Full Code Here

Examples of org.apache.avalon.fortress.util.dag.Vertex

        if ( javaClass == null ) throw new NullPointerException( "javaClass" );

        m_javaClass = javaClass;
        m_attributes = new Properties();
        m_dependencies = new ArrayList( 10 );
        m_vertex = new Vertex( this );
        m_dependencyNames = new ArrayList( 10 );
        m_serviceNames = new ArrayList( 10 );

        final DocletTag[] tags = javaClass.getTagsByName( TAG_SERVICE );
        for ( int t = 0; t < tags.length; t++ )
View Full Code Here

Examples of org.apache.giraph.graph.Vertex

  @Test
  public void testVertexWithNoEdges() throws IOException, InterruptedException {
    TaskAttemptContext tac = mock(TaskAttemptContext.class);
    when(tac.getConfiguration()).thenReturn(conf);

    Vertex vertex = mock(Vertex.class);
    when(vertex.getId()).thenReturn(new Text("The Beautiful South"));
    when(vertex.getValue()).thenReturn(new DoubleWritable(32.2d));
    // Create empty iterable == no edges
    when(vertex.getEdges()).thenReturn(new ArrayList<Text>());

    RecordWriter<Text, Text> tw = mock(RecordWriter.class);
    AdjacencyListTextVertexWriter writer = createVertexWriter(tw);
    writer.setConf(conf);
    writer.initialize(tac);
View Full Code Here

Examples of org.apache.tez.dag.api.Vertex

          dag.addEdge(e);
        }
      } else {
        // Regular vertices
        JobConf wxConf = utils.initializeVertexConf(conf, w);
        Vertex wx = utils.createVertex(wxConf, w, scratchDir, appJarLr,
          additionalLr, fs, ctx, !isFinal, work);
        dag.addVertex(wx);
        utils.addCredentials(w, dag);
        perfLogger.PerfLogEnd(CLASS_NAME, PerfLogger.TEZ_CREATE_VERTEX + w.getName());
        workToVertex.put(w, wx);
View Full Code Here

Examples of org.apache.tez.dag.app.dag.Vertex

    environment = new HashMap<String, String>();
    javaOpts = "";
    leafVertex = false;
    containerContext = new ContainerContext(localResources, credentials,
        environment, javaOpts);
    Vertex vertex = mock(Vertex.class);
    eventHandler = new TestEventHandler();
   
    mockTask = new MockTaskImpl(vertexId, partition,
        eventHandler, conf, taskAttemptListener, clock,
        taskHeartbeatHandler, appContext, leafVertex, locationHint,
View Full Code Here

Examples of org.apache.tuscany.core.databinding.impl.DirectedGraph.Vertex

    }

    public void testGraph() {
        // System.out.println(graph);

        Vertex vertex = graph.getVertex("a");
        Assert.assertNotNull(vertex);
        Assert.assertEquals(vertex.getValue(), "a");

        Assert.assertNull(graph.getVertex("1"));

        Edge edge = graph.getEdge("a", "b");
        Assert.assertNotNull(edge);
View Full Code Here

Examples of org.apache.tuscany.sca.databinding.impl.DirectedGraph.Vertex

    }

    public void testGraph() {
        // System.out.println(graph);

        Vertex vertex = graph.getVertex("a");
        Assert.assertNotNull(vertex);
        Assert.assertEquals(vertex.getValue(), "a");

        Assert.assertNull(graph.getVertex("1"));

        Edge edge = graph.getEdge("a", "b");
        Assert.assertNotNull(edge);
View Full Code Here

Examples of org.apache.xmlgraphics.util.dijkstra.Vertex

        dijkstra.execute(origin, destination);
        if (log.isTraceEnabled()) {
            log.trace("Lowest penalty: " + dijkstra.getLowestPenalty(destination));
        }
       
        Vertex prev = destination;
        Vertex pred = dijkstra.getPredecessor(destination);
        if (pred == null) {
            if (log.isTraceEnabled()) {
                log.trace("No route found!");
            }
            return null;
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.