Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 175 for Graph (0.15 sec)

  1. maven-core/src/main/java/org/apache/maven/internal/impl/Graph.java

     * specific language governing permissions and limitations
     * under the License.
     */
    package org.apache.maven.internal.impl;
    
    import java.util.*;
    
    import org.apache.maven.project.CycleDetectedException;
    
    class Graph {
        private enum DfsState {
            VISITING,
            VISITED
        }
    
        final Map<String, Vertex> vertices = new LinkedHashMap<>();
    
        public Vertex getVertex(String id) {
            return vertices.get(id);
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  2. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/Graph.java

    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    
    class Graph {
    
        final Map<String, Set<String>> graph = new LinkedHashMap<>();
    
        synchronized void addEdge(String from, String to) throws CycleDetectedException {
            if (graph.computeIfAbsent(from, l -> new HashSet<>()).add(to)) {
                List<String> cycle = visitCycle(graph, Collections.singleton(to), new HashMap<>(), new LinkedList<>());
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  3. maven-core/src/main/java/org/apache/maven/project/Graph.java

     * KIND, either express or implied.  See the License for the
     * specific language governing permissions and limitations
     * under the License.
     */
    package org.apache.maven.project;
    
    import java.util.*;
    
    class Graph {
        private enum DfsState {
            VISITING,
            VISITED
        }
    
        final Map<String, Vertex> vertices = new LinkedHashMap<>();
    
        public Vertex getVertex(String id) {
            return vertices.get(id);
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Sep 22 06:02:04 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/graph/GraphPropertiesTest.java

      public void hasCycle_isolatedNodes() {
        for (MutableGraph<Integer> graph : graphsToTest) {
          graph.addNode(1);
          graph.addNode(2);
        }
        assertThat(hasCycle(directedGraph)).isFalse();
        assertThat(hasCycle(undirectedGraph)).isFalse();
      }
    
      @Test
      public void hasCycle_oneEdge() {
        for (MutableGraph<Integer> graph : graphsToTest) {
          graph.putEdge(1, 2);
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 07 15:09:01 GMT 2016
    - 5.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/graph/GraphMutationTest.java

          MutableGraph<Integer> graph = graphBuilder.allowsSelfLoops(true).build();
    
          assertThat(graph.nodes()).isEmpty();
          assertThat(graph.edges()).isEmpty();
          AbstractGraphTest.validateGraph(graph);
    
          while (graph.nodes().size() < NUM_NODES) {
            graph.addNode(gen.nextInt(NODE_POOL_SIZE));
          }
          ArrayList<Integer> nodeList = new ArrayList<>(graph.nodes());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 18 16:17:46 GMT 2017
    - 4.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

        ImmutableValueGraph<String, Integer> graph =
            ValueGraphBuilder.directed().<String, Integer>immutable().addNode("A").build();
    
        assertThat(graph.nodes()).containsExactly("A");
        assertThat(graph.edges()).isEmpty();
      }
    
      @Test
      public void immutableValueGraphBuilder_putEdgeFromNodes() {
        ImmutableValueGraph<String, Integer> graph =
            ValueGraphBuilder.directed()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jan 09 20:24:43 GMT 2020
    - 6.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/graph/PackageSanityTests.java

        MutableNetwork<String, String> mutableNetworkB = NetworkBuilder.directed().build();
        mutableNetworkB.addNode("b");
    
        setDistinctValues(AbstractGraphBuilder.class, GRAPH_BUILDER_A, GRAPH_BUILDER_B);
        setDistinctValues(Graph.class, IMMUTABLE_GRAPH_A, IMMUTABLE_GRAPH_B);
        setDistinctValues(MutableNetwork.class, mutableNetworkA, mutableNetworkB);
        setDistinctValues(NetworkBuilder.class, NETWORK_BUILDER_A, NETWORK_BUILDER_B);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 19:24:25 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/graph/ElementOrderTest.java

        assertThat(graph.nodeOrder().comparator()).isEqualTo(Ordering.natural());
        assertThat(graph.nodes()).containsExactly(node2, node4, node6, node8).inOrder();
      }
    
      private static void addNodes(MutableGraph<Integer> graph) {
        graph.addNode(3);
        graph.addNode(1);
        graph.addNode(4);
      }
    
      private static void addEdges(MutableNetwork<Integer, String> network) {
        network.addEdge(3, 1, "i");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/graph/ImmutableGraph.java

      @SuppressWarnings("Immutable") // The backing graph must be immutable.
      private final BaseGraph<N> backingGraph;
    
      ImmutableGraph(BaseGraph<N> backingGraph) {
        this.backingGraph = backingGraph;
      }
    
      /** Returns an immutable copy of {@code graph}. */
      public static <N> ImmutableGraph<N> copyOf(Graph<N> graph) {
        return (graph instanceof ImmutableGraph)
            ? (ImmutableGraph<N>) graph
            : new ImmutableGraph<N>(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/graph/GraphEquivalenceTest.java

      // In this case the graphs are considered equivalent; the property differences are irrelevant.
      @Test
      public void equivalent_propertiesDiffer() {
        graph.putEdge(N1, N2);
    
        MutableGraph<Integer> g2 =
            GraphBuilder.from(graph).allowsSelfLoops(!graph.allowsSelfLoops()).build();
        g2.putEdge(N1, N2);
    
        assertThat(graph).isEqualTo(g2);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Jun 22 19:09:27 GMT 2017
    - 4.7K bytes
    - Viewed (0)
Back to top