| 299 | } |
| 300 | |
| 301 | void TestFullSampleNeighbors(Client* client) { |
| 302 | SamplingRequest req("click", "FullSampler", 3); |
| 303 | int64_t ids[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; |
| 304 | req.Set(ids, 10); |
| 305 | |
| 306 | SamplingResponse res; |
| 307 | Status s = client->Sampling(&req, &res); |
| 308 | std::cout << "FullSampleNeighbors: " << s.ToString() << std::endl; |
| 309 | |
| 310 | const int64_t* nbrs = res.GetNeighborIds(); |
| 311 | int32_t size = res.TotalNeighborCount(); |
| 312 | std::cout << "TotalNeighborCount: " << size << std::endl; |
| 313 | for (int32_t i = 0; i < size; ++i) { |
| 314 | std::cout << nbrs[i] << std::endl; |
| 315 | } |
| 316 | |
| 317 | int32_t batch_size = res.BatchSize(); |
| 318 | const int32_t* degrees = res.GetDegrees(); |
| 319 | for (int32_t i = 0; i < batch_size; ++i) { |
| 320 | std::cout << degrees[i] << std::endl; |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | void TestNodeWeightNegativeSample(Client* client) { |
| 325 | SamplingRequest req("user", "NodeWeightNegativeSampler", 3); |
no test coverage detected