| 221 | } |
| 222 | |
| 223 | IdWeightPairVec SampleNeighbor(const NodeIdVec& node_ids, |
| 224 | const std::vector<int>& edge_types, int count) { |
| 225 | IdWeightPairVec neighbor(node_ids.size()); |
| 226 | #ifdef OPENMP |
| 227 | #pragma omp parallel for |
| 228 | #endif |
| 229 | for (int32_t i = 0 ; i < static_cast<int32_t>(node_ids.size()); ++i) { |
| 230 | auto node = EulerGraph()->GetNodeByID(node_ids[i]); |
| 231 | if (node != nullptr) { |
| 232 | neighbor[i] = node->SampleNeighbor(edge_types, count); |
| 233 | } |
| 234 | } |
| 235 | return neighbor; |
| 236 | } |
| 237 | |
| 238 | bool GetNodeType(const std::vector<std::string*> node_types, |
| 239 | std::vector<int>* type_ids) { |
no test coverage detected