Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 46 for isDirected (0.38 sec)

  1. android/guava/src/com/google/common/graph/AbstractBaseGraph.java

          return IntMath.saturatedAdd(neighbors.size(), selfLoopCount);
        }
      }
    
      @Override
      public int inDegree(N node) {
        return isDirected() ? predecessors(node).size() : degree(node);
      }
    
      @Override
      public int outDegree(N node) {
        return isDirected() ? successors(node).size() : degree(node);
      }
    
      @Override
      public boolean hasEdgeConnecting(N nodeU, N nodeV) {
        checkNotNull(nodeU);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/graph/ForwardingValueGraph.java

       * edges() implementation.
       */
      @Override
      protected long edgeCount() {
        return delegate().edges().size();
      }
    
      @Override
      public boolean isDirected() {
        return delegate().isDirected();
      }
    
      @Override
      public boolean allowsSelfLoops() {
        return delegate().allowsSelfLoops();
      }
    
      @Override
      public ElementOrder<N> nodeOrder() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 2.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/Graphs.java

       */
      public static <N> boolean hasCycle(Graph<N> graph) {
        int numEdges = graph.edges().size();
        if (numEdges == 0) {
          return false; // An edge-free graph is acyclic by definition.
        }
        if (!graph.isDirected() && numEdges >= graph.nodes().size()) {
          return true; // Optimization for the undirected case: at least one cycle must exist.
        }
    
        Map<Object, NodeVisitState> visitedNodes =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/StandardValueGraph.java

        this.edgeCount = checkNonNegative(edgeCount);
      }
    
      @Override
      public Set<N> nodes() {
        return nodeConnections.unmodifiableKeySet();
      }
    
      @Override
      public boolean isDirected() {
        return isDirected;
      }
    
      @Override
      public boolean allowsSelfLoops() {
        return allowsSelfLoops;
      }
    
      @Override
      public ElementOrder<N> nodeOrder() {
        return nodeOrder;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/StandardMutableValueGraph.java

          requireNonNull(nodeConnections.getWithoutCaching(successor)).removePredecessor(node);
          requireNonNull(connections.removeSuccessor(successor));
          --edgeCount;
        }
        if (isDirected()) { // In undirected graphs, the successor and predecessor sets are equal.
          // Since views are returned, we need to copy the predecessors that will be removed.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Oct 21 01:50:30 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

            GraphBuilder.directed()
                .allowsSelfLoops(true)
                .nodeOrder(ElementOrder.<String>natural())
                .immutable()
                .build();
    
        assertThat(emptyGraph.isDirected()).isTrue();
        assertThat(emptyGraph.allowsSelfLoops()).isTrue();
        assertThat(emptyGraph.nodeOrder()).isEqualTo(ElementOrder.<String>natural());
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jan 09 20:24:43 GMT 2020
    - 4.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/AbstractGraphTest.java

        assertStronglyEquivalent(graph, Graphs.copyOf(graph));
        assertStronglyEquivalent(graph, ImmutableGraph.copyOf(graph));
    
        String graphString = graph.toString();
        assertThat(graphString).contains("isDirected: " + graph.isDirected());
        assertThat(graphString).contains("allowsSelfLoops: " + graph.allowsSelfLoops());
    
        int nodeStart = graphString.indexOf("nodes:");
        int edgeStart = graphString.indexOf("edges:");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

            ValueGraphBuilder.directed()
                .allowsSelfLoops(true)
                .nodeOrder(ElementOrder.<String>natural())
                .<String, Integer>immutable()
                .build();
    
        assertThat(emptyGraph.isDirected()).isTrue();
        assertThat(emptyGraph.allowsSelfLoops()).isTrue();
        assertThat(emptyGraph.nodeOrder()).isEqualTo(ElementOrder.<String>natural());
      }
    
      /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Jan 09 20:24:43 GMT 2020
    - 6.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/graph/AbstractGraphTest.java

        assertStronglyEquivalent(graph, Graphs.copyOf(graph));
        assertStronglyEquivalent(graph, ImmutableGraph.copyOf(graph));
    
        String graphString = graph.toString();
        assertThat(graphString).contains("isDirected: " + graph.isDirected());
        assertThat(graphString).contains("allowsSelfLoops: " + graph.allowsSelfLoops());
    
        int nodeStart = graphString.indexOf("nodes:");
        int edgeStart = graphString.indexOf("edges:");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/graph/IncidentEdgeSet.java

        this.node = node;
      }
    
      @Override
      public boolean remove(@CheckForNull Object o) {
        throw new UnsupportedOperationException();
      }
    
      @Override
      public int size() {
        if (graph.isDirected()) {
          return graph.inDegree(node)
              + graph.outDegree(node)
              - (graph.successors(node).contains(node) ? 1 : 0);
        } else {
          return graph.adjacentNodes(node).size();
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 2.3K bytes
    - Viewed (0)
Back to top