• Home
  • Raw
  • Download

Lines Matching refs:G

37     std::remove_const_t<T> G;  in getTestGraph()  local
38 G.insert(make_pair(1u, VAttr({3u}))); in getTestGraph()
39 G.insert(make_pair(2u, VAttr({5u}))); in getTestGraph()
40 G.insert(make_pair(3u, VAttr({7u}))); in getTestGraph()
41 G.insert(make_pair(4u, VAttr({11u}))); in getTestGraph()
42 G.insert(make_pair(5u, VAttr({13u}))); in getTestGraph()
43 G.insert(make_pair(6u, VAttr({17u}))); in getTestGraph()
45 G.insert(std::make_pair(EI(1u, 2u), EAttr({3u * 5u}))); in getTestGraph()
46 G.insert(std::make_pair(EI(2u, 3u), EAttr({5u * 7u}))); in getTestGraph()
47 G.insert(std::make_pair(EI(6u, 3u), EAttr({2u * 7u * 17u}))); in getTestGraph()
48 G.insert(std::make_pair(EI(4u, 6u), EAttr({11u * 17u}))); in getTestGraph()
49 G.insert(std::make_pair(EI(2u, 4u), EAttr({5u * 11u}))); in getTestGraph()
50 G.insert(std::make_pair(EI(2u, 5u), EAttr({5u * 13u}))); in getTestGraph()
51 G.insert(std::make_pair(EI(4u, 5u), EAttr({11u * 13u}))); in getTestGraph()
53 return G; in getTestGraph()
64 template <typename T> void graphVertexTester(T &G) { in graphVertexTester() argument
68 EXPECT_EQ(V.size(), G.vertices().size()); in graphVertexTester()
69 EXPECT_FALSE(G.vertices().empty()); in graphVertexTester()
71 auto EVV = G.at(u); in graphVertexTester()
73 EXPECT_EQ(1u, G.count(u)); in graphVertexTester()
75 EXPECT_NE(G.vertices().end(), in graphVertexTester()
76 std::find_if(G.vertices().begin(), G.vertices().end(), in graphVertexTester()
81 for (auto &VVT : G.vertices()) { in graphVertexTester()
87 template <typename T> void graphEdgeTester(T &G) { in graphEdgeTester() argument
94 EXPECT_EQ(E.size(), G.edges().size()); in graphEdgeTester()
95 EXPECT_FALSE(G.edges().empty()); in graphEdgeTester()
97 auto EEV = G.at(u); in graphEdgeTester()
99 EXPECT_EQ(1u, G.count(u)); in graphEdgeTester()
103 EXPECT_NE(G.edges().end(), in graphEdgeTester()
104 std::find_if(G.edges().begin(), G.edges().end(), Pred)); in graphEdgeTester()
108 for (auto &EV : G.edges()) { in graphEdgeTester()
113 const auto &IE = G.inEdges(EV.first.second); in graphEdgeTester()
114 const auto &OE = G.outEdges(EV.first.first); in graphEdgeTester()
121 G.inEdges(EV.first.second).begin(), G.inEdges(EV.first.second).end(), in graphEdgeTester()
123 EXPECT_NE(G.inEdges(EV.first.second).end(), It); in graphEdgeTester()
127 G.inEdges(EV.first.first).begin(), G.inEdges(EV.first.first).end(), in graphEdgeTester()
129 EXPECT_EQ(G.inEdges(EV.first.first).end(), It); in graphEdgeTester()
133 std::find_if(G.outEdges(EV.first.second).begin(), in graphEdgeTester()
134 G.outEdges(EV.first.second).end(), in graphEdgeTester()
136 EXPECT_EQ(G.outEdges(EV.first.second).end(), It); in graphEdgeTester()
140 G.outEdges(EV.first.first).begin(), G.outEdges(EV.first.first).end(), in graphEdgeTester()
142 EXPECT_NE(G.outEdges(EV.first.first).end(), It); in graphEdgeTester()
148 auto &G = this->Graph; in TYPED_TEST() local
150 graphEdgeTester(G); in TYPED_TEST()
154 auto &G = this->Graph; in TYPED_TEST() local
156 graphVertexTester(G); in TYPED_TEST()
160 TypeParam G(this->Graph); in TYPED_TEST() local
162 graphEdgeTester(G); in TYPED_TEST()
163 graphVertexTester(G); in TYPED_TEST()
167 TypeParam G = this->Graph; in TYPED_TEST() local
169 graphEdgeTester(G); in TYPED_TEST()
170 graphVertexTester(G); in TYPED_TEST()
174 TypeParam G(std::move(this->Graph)); in TYPED_TEST() local
176 graphEdgeTester(G); in TYPED_TEST()
177 graphVertexTester(G); in TYPED_TEST()
183 const GraphT &G = MG; in TEST() local
184 EXPECT_EQ(0u, G.count(0u)); in TEST()
185 EXPECT_EQ(0u, G.count({0u, 1u})); in TEST()
186 auto VE = G.at(0); in TEST()
187 auto EE = G.at({0, 0}); in TEST()
192 EXPECT_TRUE(G.vertices().empty()); in TEST()
193 EXPECT_TRUE(G.edges().empty()); in TEST()
194 EXPECT_EQ(G.vertices().begin(), G.vertices().end()); in TEST()
195 EXPECT_EQ(G.edges().begin(), G.edges().end()); in TEST()
200 const GraphT &G = MG; in TEST() local
204 EXPECT_EQ(1u, G.count(0u)); in TEST()
205 EXPECT_EQ(0u, G.count(1u)); in TEST()
207 auto T = G.at(0u); in TEST()
211 EXPECT_EQ(1u, G.vertices().size()); in TEST()
212 EXPECT_EQ(0u, G.edges().size()); in TEST()
213 EXPECT_FALSE(G.vertices().empty()); in TEST()
214 EXPECT_TRUE(G.edges().empty()); in TEST()
215 EXPECT_NE(G.vertices().begin(), G.vertices().end()); in TEST()
216 EXPECT_EQ(G.edges().begin(), G.edges().end()); in TEST()
217 EXPECT_EQ(1u, G.vertices().begin()->second.VA); in TEST()
218 EXPECT_EQ(0u, G.vertices().begin()->first); in TEST()
219 EXPECT_EQ(0u, G.outEdges(0u).size()); in TEST()
220 EXPECT_TRUE(G.outEdges(0u).empty()); in TEST()
221 EXPECT_EQ(G.outEdges(0u).begin(), G.outEdges(0u).end()); in TEST()
222 EXPECT_EQ(0u, G.inEdges(0u).size()); in TEST()
223 EXPECT_TRUE(G.inEdges(0u).empty()); in TEST()
224 EXPECT_EQ(G.inEdges(0u).begin(), G.inEdges(0u).end()); in TEST()
229 const GraphT &G = MG; in TEST() local
234 EXPECT_EQ(1u, G.count({0u, 0u})); in TEST()
235 EXPECT_EQ(0u, G.count({0u, 1u})); in TEST()
236 EXPECT_EQ(1u, G.count(0u)); in TEST()
237 EXPECT_NE(1u, G.count(1u)); in TEST()
238 auto T = G.at({0u, 0u}); in TEST()
240 EXPECT_EQ(1u, G.edges().size()); in TEST()
241 EXPECT_EQ(1u, G.vertices().size()); in TEST()
242 EXPECT_FALSE(G.edges().empty()); in TEST()
243 EXPECT_FALSE(G.vertices().empty()); in TEST()
244 EXPECT_NE(G.edges().begin(), G.edges().end()); in TEST()
245 EXPECT_EQ(EI(0u, 0u), G.edges().begin()->first); in TEST()
246 EXPECT_EQ(2u, G.edges().begin()->second.EA); in TEST()
247 EXPECT_EQ(1u, G.outEdges(0u).size()); in TEST()
248 EXPECT_FALSE(G.outEdges(0u).empty()); in TEST()
249 EXPECT_NE(G.outEdges(0u).begin(), G.outEdges(0u).end()); in TEST()
250 EXPECT_EQ(EI(0u, 0u), G.outEdges(0u).begin()->first); in TEST()
251 EXPECT_EQ(2u, G.outEdges(0u).begin()->second.EA); in TEST()
252 EXPECT_EQ(++(G.outEdges(0u).begin()), G.outEdges(0u).end()); in TEST()
253 EXPECT_EQ(1u, G.inEdges(0u).size()); in TEST()
254 EXPECT_FALSE(G.inEdges(0u).empty()); in TEST()
255 EXPECT_NE(G.inEdges(0u).begin(), G.inEdges(0u).end()); in TEST()
256 EXPECT_EQ(EI(0u, 0u), G.inEdges(0u).begin()->first); in TEST()
257 EXPECT_EQ(2u, G.inEdges(0u).begin()->second.EA); in TEST()
258 EXPECT_EQ(++(G.inEdges(0u).begin()), G.inEdges(0u).end()); in TEST()