MCPcopy Create free account
hub / github.com/alibaba/graph-learn / GenSubGraphNodeTestData

Function GenSubGraphNodeTestData

graphlearn/src/service/test/server_test.cpp:204–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void GenSubGraphNodeTestData(const char* file_name) {
205 std::ofstream out(file_name);
206 const char* title = "node_id:int64\tnode_weight:float\n";
207 out.write(title, strlen(title));
208 int size = 0;
209 char buffer[64];
210 for (int32_t i = 0; i < 20; ++i) {
211 size = snprintf(buffer, sizeof(buffer), "%d\t%f\n", i, float(i));
212 out.write(buffer, size);
213 }
214 out.close();
215}
216
217
218int main(int argc, char** argv) {

Callers 1

mainFunction · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected