| /external/guava/guava-tests/test/com/google/common/graph/ |
| D | ValueGraphTest.java | 17 package com.google.common.graph; 19 import static com.google.common.graph.GraphConstants.ENDPOINTS_MISMATCH; 20 import static com.google.common.graph.TestUtil.assertStronglyEquivalent; 44 MutableValueGraph<Integer, String> graph; field in ValueGraphTest 48 assertStronglyEquivalent(graph, Graphs.copyOf(graph)); in validateGraphState() 49 assertStronglyEquivalent(graph, ImmutableValueGraph.copyOf(graph)); in validateGraphState() 51 Graph<Integer> asGraph = graph.asGraph(); in validateGraphState() 53 assertThat(graph.nodes()).isEqualTo(asGraph.nodes()); in validateGraphState() 54 assertThat(graph.edges()).isEqualTo(asGraph.edges()); in validateGraphState() 55 assertThat(graph.nodeOrder()).isEqualTo(asGraph.nodeOrder()); in validateGraphState() [all …]
|
| D | AbstractGraphTest.java | 17 package com.google.common.graph; 19 import static com.google.common.graph.TestUtil.assertNodeNotInGraphErrorMessage; 20 import static com.google.common.graph.TestUtil.assertStronglyEquivalent; 21 import static com.google.common.graph.TestUtil.sanityCheckSet; 34 * Abstract base class for testing implementations of {@link Graph} interface. Graph instances 37 * <p>Test cases that should be handled similarly in any graph implementation are included in this 39 * graph. The following test cases are left for the subclasses to handle: 42 * <li>Test cases related to whether the graph is directed or undirected. 43 * <li>Test cases related to the specific implementation of the {@link Graph} interface. 51 Graph<Integer> graph; field in AbstractGraphTest [all …]
|
| D | AbstractStandardUndirectedGraphTest.java | 17 package com.google.common.graph; 30 * Abstract base class for testing undirected {@link Graph} implementations defined in this package. 36 for (Integer node : graph.nodes()) { in validateUndirectedEdges() 39 graph.predecessors(node), graph.successors(node), graph.adjacentNodes(node)) in validateUndirectedEdges() 49 Set<Integer> nodes = graph.nodes(); in nodes_checkReturnedSetMutability() 53 assertThat(graph.nodes()).containsExactlyElementsIn(nodes); in nodes_checkReturnedSetMutability() 62 Set<Integer> adjacentNodes = graph.adjacentNodes(N1); in adjacentNodes_checkReturnedSetMutability() 66 assertThat(graph.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes); in adjacentNodes_checkReturnedSetMutability() 75 Set<Integer> predecessors = graph.predecessors(N2); in predecessors_checkReturnedSetMutability() 79 assertThat(graph.predecessors(N2)).containsExactlyElementsIn(predecessors); in predecessors_checkReturnedSetMutability() [all …]
|
| D | AbstractStandardDirectedGraphTest.java | 17 package com.google.common.graph; 19 import static com.google.common.graph.GraphConstants.ENDPOINTS_MISMATCH; 29 * Abstract base class for testing directed {@link Graph} implementations defined in this package. 38 Set<Integer> nodes = graph.nodes(); in nodes_checkReturnedSetMutability() 42 assertThat(graph.nodes()).containsExactlyElementsIn(nodes); in nodes_checkReturnedSetMutability() 51 Set<Integer> adjacentNodes = graph.adjacentNodes(N1); in adjacentNodes_checkReturnedSetMutability() 55 assertThat(graph.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes); in adjacentNodes_checkReturnedSetMutability() 64 Set<Integer> predecessors = graph.predecessors(N2); in predecessors_checkReturnedSetMutability() 68 assertThat(graph.predecessors(N2)).containsExactlyElementsIn(predecessors); in predecessors_checkReturnedSetMutability() 77 Set<Integer> successors = graph.successors(N1); in successors_checkReturnedSetMutability() [all …]
|
| /external/guava/android/guava-tests/test/com/google/common/graph/ |
| D | ValueGraphTest.java | 17 package com.google.common.graph; 19 import static com.google.common.graph.GraphConstants.ENDPOINTS_MISMATCH; 20 import static com.google.common.graph.TestUtil.assertStronglyEquivalent; 43 MutableValueGraph<Integer, String> graph; field in ValueGraphTest 47 assertStronglyEquivalent(graph, Graphs.copyOf(graph)); in validateGraphState() 48 assertStronglyEquivalent(graph, ImmutableValueGraph.copyOf(graph)); in validateGraphState() 50 Graph<Integer> asGraph = graph.asGraph(); in validateGraphState() 52 assertThat(graph.nodes()).isEqualTo(asGraph.nodes()); in validateGraphState() 53 assertThat(graph.edges()).isEqualTo(asGraph.edges()); in validateGraphState() 54 assertThat(graph.nodeOrder()).isEqualTo(asGraph.nodeOrder()); in validateGraphState() [all …]
|
| D | AbstractGraphTest.java | 17 package com.google.common.graph; 19 import static com.google.common.graph.TestUtil.assertNodeNotInGraphErrorMessage; 20 import static com.google.common.graph.TestUtil.assertStronglyEquivalent; 21 import static com.google.common.graph.TestUtil.sanityCheckSet; 34 * Abstract base class for testing implementations of {@link Graph} interface. Graph instances 37 * <p>Test cases that should be handled similarly in any graph implementation are included in this 39 * graph. The following test cases are left for the subclasses to handle: 42 * <li>Test cases related to whether the graph is directed or undirected. 43 * <li>Test cases related to the specific implementation of the {@link Graph} interface. 51 Graph<Integer> graph; field in AbstractGraphTest [all …]
|
| D | AbstractStandardUndirectedGraphTest.java | 17 package com.google.common.graph; 30 * Abstract base class for testing undirected {@link Graph} implementations defined in this package. 36 for (Integer node : graph.nodes()) { in validateUndirectedEdges() 39 graph.predecessors(node), graph.successors(node), graph.adjacentNodes(node)) in validateUndirectedEdges() 49 Set<Integer> nodes = graph.nodes(); in nodes_checkReturnedSetMutability() 53 assertThat(graph.nodes()).containsExactlyElementsIn(nodes); in nodes_checkReturnedSetMutability() 62 Set<Integer> adjacentNodes = graph.adjacentNodes(N1); in adjacentNodes_checkReturnedSetMutability() 66 assertThat(graph.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes); in adjacentNodes_checkReturnedSetMutability() 75 Set<Integer> predecessors = graph.predecessors(N2); in predecessors_checkReturnedSetMutability() 79 assertThat(graph.predecessors(N2)).containsExactlyElementsIn(predecessors); in predecessors_checkReturnedSetMutability() [all …]
|
| D | AbstractStandardDirectedGraphTest.java | 17 package com.google.common.graph; 19 import static com.google.common.graph.GraphConstants.ENDPOINTS_MISMATCH; 29 * Abstract base class for testing directed {@link Graph} implementations defined in this package. 38 Set<Integer> nodes = graph.nodes(); in nodes_checkReturnedSetMutability() 42 assertThat(graph.nodes()).containsExactlyElementsIn(nodes); in nodes_checkReturnedSetMutability() 51 Set<Integer> adjacentNodes = graph.adjacentNodes(N1); in adjacentNodes_checkReturnedSetMutability() 55 assertThat(graph.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes); in adjacentNodes_checkReturnedSetMutability() 64 Set<Integer> predecessors = graph.predecessors(N2); in predecessors_checkReturnedSetMutability() 68 assertThat(graph.predecessors(N2)).containsExactlyElementsIn(predecessors); in predecessors_checkReturnedSetMutability() 77 Set<Integer> successors = graph.successors(N1); in successors_checkReturnedSetMutability() [all …]
|
| /external/tensorflow/tensorflow/lite/delegates/gpu/common/ |
| D | model_test.cc | 31 GraphFloat32 graph; in TEST() local 32 Node* node = graph.NewNode(); in TEST() 33 Value* graph_input = graph.NewValue(); in TEST() 34 Value* graph_output = graph.NewValue(); in TEST() 35 ASSERT_TRUE(graph.AddConsumer(node->id, graph_input->id).ok()); in TEST() 36 ASSERT_TRUE(graph.SetProducer(node->id, graph_output->id).ok()); in TEST() 38 EXPECT_THAT(graph.nodes(), ElementsAre(node)); in TEST() 39 EXPECT_THAT(graph.values(), UnorderedElementsAre(graph_input, graph_output)); in TEST() 40 EXPECT_THAT(graph.inputs(), UnorderedElementsAre(graph_input)); in TEST() 41 EXPECT_THAT(graph.outputs(), UnorderedElementsAre(graph_output)); in TEST() [all …]
|
| /external/google-fruit/tests/data_structures/ |
| D | test_semistatic_graph.py | 35 Graph graph(values.begin(), values.end(), memory_pool); 36 Assert(graph.find(0) == graph.end()); 37 Assert(graph.find(2) == graph.end()); 38 Assert(graph.find(5) == graph.end()); 39 const Graph& cgraph = graph; 56 Graph graph(values.begin(), values.end(), memory_pool); 57 Assert(graph.find(0) == graph.end()); 58 Assert(!(graph.find(2) == graph.end())); 59 Assert(graph.at(2).getNode() == string("foo")); 60 Assert(graph.at(2).isTerminal() == false); [all …]
|
| /external/skia/tests/ |
| D | TopoSortTest.cpp | 22 typedef void (*CreateGraphPF)(TArray<sk_sp<ToolUtils::TopoTestNode>>* graph); 33 static void create_graph0(TArray<sk_sp<ToolUtils::TopoTestNode>>* graph) { in create_graph0() argument 34 ToolUtils::TopoTestNode::AllocNodes(graph, 4); in create_graph0() 36 (*graph)[0]->dependsOn((*graph)[1].get()); in create_graph0() 37 (*graph)[0]->dependsOn((*graph)[2].get()); in create_graph0() 38 (*graph)[1]->dependsOn((*graph)[3].get()); in create_graph0() 39 (*graph)[2]->dependsOn((*graph)[3].get()); in create_graph0() 42 static void create_simple_chain(TArray<sk_sp<ToolUtils::TopoTestNode>>* graph, int n) { in create_simple_chain() argument 43 ToolUtils::TopoTestNode::AllocNodes(graph, n); in create_simple_chain() 46 (*graph)[i+1]->dependsOn((*graph)[i].get()); in create_simple_chain() [all …]
|
| /external/tensorflow/tensorflow/lite/delegates/gpu/common/transformations/ |
| D | remove_noop_test.cc | 40 GraphFloat32 graph; in TEST() local 41 auto input = graph.NewValue(); in TEST() 42 auto first_node = graph.NewNode(); in TEST() 43 ASSERT_TRUE(graph.AddConsumer(first_node->id, input->id).ok()); in TEST() 45 auto add_node = graph.NewNode(); in TEST() 47 ASSERT_TRUE(AddOutput(&graph, add_node, &output).ok()); in TEST() 52 ASSERT_TRUE(ConnectTwoNodes(&graph, first_node, add_node, &temp).ok()); in TEST() 53 ASSERT_EQ(2, graph.nodes().size()); in TEST() 54 ASSERT_EQ(3, graph.values().size()); in TEST() 57 ModelTransformer transformer(&graph); in TEST() [all …]
|
| D | merge_padding_with_test.cc | 37 GraphFloat32 graph; in TEST() local 38 auto input = graph.NewValue(); in TEST() 40 auto pad_node = graph.NewNode(); in TEST() 41 ASSERT_TRUE(graph.AddConsumer(pad_node->id, input->id).ok()); in TEST() 48 auto conv_node = graph.NewNode(); in TEST() 50 ASSERT_TRUE(ConnectTwoNodes(&graph, pad_node, conv_node, &temp).ok()); in TEST() 51 ASSERT_TRUE(AddOutput(&graph, conv_node, &temp).ok()); in TEST() 58 ASSERT_EQ(2, graph.nodes().size()); in TEST() 61 ModelTransformer transformer(&graph); in TEST() 64 ASSERT_EQ(1, graph.nodes().size()); in TEST() [all …]
|
| /external/armnn/src/armnnDeserializer/ |
| D | Deserializer.hpp | 59 static TensorRawPtrVector GetInputs(const GraphPtr& graph, unsigned int layerIndex); 60 static TensorRawPtrVector GetOutputs(const GraphPtr& graph, unsigned int layerIndex); 63 static std::string GetLayerName(const GraphPtr& graph, unsigned int index); 80 /// Create the network from an already loaded flatbuffers graph 81 armnn::INetworkPtr CreateNetworkFromGraph(GraphPtr graph); 84 using LayerParsingFunction = void(DeserializerImpl::*)(GraphPtr graph, unsigned int layerIndex); 86 void ParseUnsupportedLayer(GraphPtr graph, unsigned int layerIndex); 87 void ParseAbs(GraphPtr graph, unsigned int layerIndex); 88 void ParseActivation(GraphPtr graph, unsigned int layerIndex); 89 void ParseAdd(GraphPtr graph, unsigned int layerIndex); [all …]
|
| /external/tensorflow/tensorflow/core/grappler/optimizers/data/ |
| D | graph_utils_test.cc | 20 #include "tensorflow/core/graph/node_builder.h" 49 MutableGraphView graph(&graph_def); in TEST() local 50 NodeDef* bool_node = AddScalarConstNode<bool>(true, &graph); in TEST() 51 EXPECT_TRUE(ContainsGraphNodeWithName(bool_node->name(), *graph.graph())); in TEST() 57 MutableGraphView graph(&graph_def); in TEST() local 58 NodeDef* double_node = AddScalarConstNode<double>(3.14, &graph); in TEST() 59 EXPECT_TRUE(ContainsGraphNodeWithName(double_node->name(), *graph.graph())); in TEST() 65 MutableGraphView graph(&graph_def); in TEST() local 66 NodeDef* float_node = AddScalarConstNode<float>(3.14, &graph); in TEST() 67 EXPECT_TRUE(ContainsGraphNodeWithName(float_node->name(), *graph.graph())); in TEST() [all …]
|
| /external/tensorflow/tensorflow/python/saved_model/ |
| D | saved_model_test.py | 123 with self.session(graph=ops.Graph()) as sess: 136 with self.session(graph=ops.Graph()) as sess: 145 with self.session(graph=ops.Graph()) as sess: 157 with self.session(graph=ops.Graph()) as sess: 166 with self.session(graph=ops.Graph()) as sess: 188 with self.session(graph=ops.Graph()) as sess: 198 with self.session(graph=ops.Graph()) as sess: 212 with self.session(graph=ops.Graph()) as sess: 222 with ops.Graph().as_default(): 223 with self.session(graph=ops.Graph()) as sess: [all …]
|
| /external/ComputeLibrary/arm_compute/graph/nodes/ |
| D | Nodes.h | 27 #include "arm_compute/graph/nodes/ActivationLayerNode.h" 28 #include "arm_compute/graph/nodes/ArgMinMaxLayerNode.h" 29 #include "arm_compute/graph/nodes/BatchNormalizationLayerNode.h" 30 #include "arm_compute/graph/nodes/BoundingBoxTransformLayerNode.h" 31 #include "arm_compute/graph/nodes/ChannelShuffleLayerNode.h" 32 #include "arm_compute/graph/nodes/ConcatenateLayerNode.h" 33 #include "arm_compute/graph/nodes/ConstNode.h" 34 #include "arm_compute/graph/nodes/ConvolutionLayerNode.h" 35 #include "arm_compute/graph/nodes/DeconvolutionLayerNode.h" 36 #include "arm_compute/graph/nodes/DepthToSpaceLayerNode.h" [all …]
|
| /external/tensorflow/tensorflow/core/common_runtime/ |
| D | forward_type_inference_test.cc | 32 #include "tensorflow/core/graph/graph_def_builder.h" 33 #include "tensorflow/core/graph/node_builder.h" 41 Status Rewrite(std::unique_ptr<Graph>* graph) { in Rewrite() argument 42 FunctionLibraryDefinition flib_def((*graph)->flib_def()); in Rewrite() 46 opt_options.graph = graph; in Rewrite() 53 std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global())); in TEST() local 65 TF_ASSERT_OK(NodeBuilder("ds", "RangeDataset", &root.graph()->flib_def()) in TEST() 71 .Finalize(root.graph(), &ds)); in TEST() 74 TF_ASSERT_OK(NodeBuilder("id", "Identity", &root.graph()->flib_def()) in TEST() 77 .Finalize(root.graph(), &id)); in TEST() [all …]
|
| /external/guava/guava/src/com/google/common/graph/ |
| D | Graphs.java | 17 package com.google.common.graph; 20 import static com.google.common.graph.GraphConstants.NODE_NOT_IN_GRAPH; 39 * Static utility methods for {@link Graph}, {@link ValueGraph}, and {@link Network} instances. 51 // Graph query methods 54 * Returns true if {@code graph} has at least one cycle. A cycle is defined as a non-empty subset 55 * of edges in a graph arranged to form a path (a sequence of adjacent outgoing edges) starting 60 public static <N> boolean hasCycle(Graph<N> graph) { in hasCycle() argument 61 int numEdges = graph.edges().size(); in hasCycle() 63 return false; // An edge-free graph is acyclic by definition. in hasCycle() 65 if (!graph.isDirected() && numEdges >= graph.nodes().size()) { in hasCycle() [all …]
|
| /external/guava/android/guava/src/com/google/common/graph/ |
| D | Graphs.java | 17 package com.google.common.graph; 20 import static com.google.common.graph.GraphConstants.NODE_NOT_IN_GRAPH; 38 * Static utility methods for {@link Graph}, {@link ValueGraph}, and {@link Network} instances. 50 // Graph query methods 53 * Returns true if {@code graph} has at least one cycle. A cycle is defined as a non-empty subset 54 * of edges in a graph arranged to form a path (a sequence of adjacent outgoing edges) starting 59 public static <N> boolean hasCycle(Graph<N> graph) { in hasCycle() argument 60 int numEdges = graph.edges().size(); in hasCycle() 62 return false; // An edge-free graph is acyclic by definition. in hasCycle() 64 if (!graph.isDirected() && numEdges >= graph.nodes().size()) { in hasCycle() [all …]
|
| /external/ComputeLibrary/src/graph/ |
| D | GraphManager.cpp | 24 #include "arm_compute/graph/GraphManager.h" 26 #include "arm_compute/graph/Graph.h" 27 #include "arm_compute/graph/GraphContext.h" 28 #include "arm_compute/graph/Logger.h" 29 #include "arm_compute/graph/PassManager.h" 30 #include "arm_compute/graph/TypePrinter.h" 31 #include "arm_compute/graph/Utils.h" 32 #include "arm_compute/graph/algorithms/TopologicalSort.h" 33 #include "arm_compute/graph/detail/CrossLayerMemoryManagerHelpers.h" 34 #include "arm_compute/graph/detail/ExecutionHelpers.h" [all …]
|
| /external/tensorflow/tensorflow/core/kernels/ |
| D | training_ops_test.cc | 44 static Node* Var(Graph* g, int n) { in Var() 45 return test::graph::Var(g, DT_FLOAT, TensorShape({n})); in Var() 48 static Node* Var(Graph* g, int m, int n) { in Var() 49 return test::graph::Var(g, DT_FLOAT, TensorShape({m, n})); in Var() 52 static Node* Zeros(Graph* g, int n) { in Zeros() 55 return test::graph::Constant(g, data); in Zeros() 58 static Node* Zeros(Graph* g, int m, int n) { in Zeros() 61 return test::graph::Constant(g, data); in Zeros() 64 static Node* Random(Graph* g, int n) { in Random() 67 return test::graph::Constant(g, data); in Random() [all …]
|
| /external/tensorflow/tensorflow/compiler/jit/ |
| D | mark_for_compilation_pass_test.cc | 45 #include "tensorflow/core/graph/algorithm.h" 46 #include "tensorflow/core/graph/graph_def_builder.h" 64 std::unordered_map<string, string> GetClusters(const Graph& graph) { in GetClusters() argument 66 for (Node* node : graph.nodes()) { in GetClusters() 83 std::set<string> GetClusterNames(const Graph& graph) { in GetClusterNames() argument 85 for (Node* node : graph.nodes()) { in GetClusterNames() 96 const Graph& g, std::vector<string>* cluster_names = nullptr) { in GetClusterSets() 115 std::unique_ptr<Graph> graph(new Graph(OpRegistry::Global())); in TEST() local 126 TF_EXPECT_OK(GraphDefBuilderToGraph(builder, graph.get())); in TEST() 129 TF_ASSERT_OK(MarkForCompilationPassTestHelper::MarkForCompilation(&graph)); in TEST() [all …]
|
| /external/tensorflow/tensorflow/core/tpu/kernels/ |
| D | sharding_util_ops_test.cc | 25 #include "tensorflow/core/framework/graph.pb.h" 31 #include "tensorflow/core/graph/graph.h" 32 #include "tensorflow/core/graph/node_builder.h" 33 #include "tensorflow/core/graph/testlib.h" 51 Status RunGraph(const Graph& graph, in RunGraph() argument 56 graph.ToGraphDef(&graph_def); in RunGraph() 67 Graph graph(OpRegistry::Global()); in TEST() local 72 TF_ASSERT_OK(NodeBuilder(graph.NewName("var_handle"), "VarHandleOp") in TEST() 75 .Finalize(&graph, &var_handle)); in TEST() 80 TF_ASSERT_OK(NodeBuilder(graph.NewName("xla_op"), "ReadVariableXlaSplitND") in TEST() [all …]
|
| /external/tensorflow/tensorflow/core/grappler/ |
| D | mutable_graph_view_test.cc | 22 #include "tensorflow/core/graph/tensor_id.h" 36 void CompareNodeFanins(const MutableGraphView& graph, NodeDef* node, in CompareNodeFanins() argument 43 if (tensor_id.index() == Graph::kControlSlot) { in CompareNodeFanins() 44 port = Graph::kControlSlot; in CompareNodeFanins() 50 graph.GetOutputPort(tensor_id.node(), tensor_id.index()); in CompareNodeFanins() 51 EXPECT_TRUE(graph.GetFanin(input_port).contains(output_port)); in CompareNodeFanins() 52 EXPECT_TRUE(graph.GetFanout(output_port).contains(input_port)); in CompareNodeFanins() 56 void CompareNodeFanouts(const MutableGraphView& graph, NodeDef* node, in CompareNodeFanouts() argument 59 graph.GetFanouts(*node, /*include_controlled_nodes=*/true); in CompareNodeFanouts() 63 MutableGraphView::InputPort input_port(graph.GetNode(tensor_id.node()), in CompareNodeFanouts() [all …]
|