MCPcopy Create free account
hub / github.com/alibaba/euler / GetNode

Function GetNode

euler/core/graph/node_test.cc:26–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace euler {
25
26Node* GetNode() {
27 Node* fn = new Node(1, 1.0, 0);
28 std::vector<std::vector<uint64_t>> neighbor_ids;
29 std::vector<std::vector<float>> neighbor_weight;
30 {
31 std::vector<uint64_t> id{1, 3, 5};
32 std::vector<float> w{1, 3, 1};
33 neighbor_ids.push_back(id);
34 neighbor_weight.push_back(w);
35 }
36 {
37 std::vector<uint64_t> id{2, 4};
38 std::vector<float> w{0.2, 0.4};
39 neighbor_ids.push_back(id);
40 neighbor_weight.push_back(w);
41 }
42 {
43 std::vector<uint64_t> id{10, 11, 12, 13};
44 std::vector<float> w{1, 1, 2, 2};
45 neighbor_ids.push_back(id);
46 neighbor_weight.push_back(w);
47 }
48 std::vector<std::vector<uint64_t>> uint64_features;
49 {
50 uint64_features.push_back({10001, 10002, 10003});
51 uint64_features.push_back({20001, 20002, 20003, 20004});
52 uint64_features.push_back({30001, 30002});
53 }
54 std::vector<std::vector<float>> float_features;
55 {
56 float_features.push_back({1.1, 1.2});
57 float_features.push_back({2.1, 2.2, 2.3});
58 }
59 std::vector<std::string> binary_features;
60 {
61 binary_features.push_back("iam1");
62 binary_features.push_back("iam22");
63 binary_features.push_back("iam333");
64 }
65 if (fn->Init(neighbor_ids, neighbor_weight,
66 uint64_features, float_features,
67 binary_features)) {
68 return fn;
69 }
70 return nullptr;
71}
72
73
74#define CHECK_PAIR_VEC(V1, V2, V3) { \

Callers 1

TESTFunction · 0.85

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected