(node_type)
| 172 | |
| 173 | |
| 174 | def gen_cond_node(node_type): |
| 175 | def write_meta(f): |
| 176 | meta = 'id:int64\tweight:float\tfeature:string\n' |
| 177 | f.write(meta) |
| 178 | |
| 179 | def write_data(f): |
| 180 | for i in range(200): |
| 181 | line = '%d\t%f\t%d:%d:%f:%s\n' % (i, i * 0.1, i % 5, i % 4, i * 0.3, str(i%3)) |
| 182 | f.write(line) |
| 183 | |
| 184 | path = '%s/%s_%d' % (DATA_PATH, node_type, int(time.time() * 1000)) |
| 185 | with open(path, 'w') as f: |
| 186 | write_meta(f) |
| 187 | write_data(f) |
| 188 | return path |
| 189 | |
| 190 | |
| 191 | def check_node_ids(nodes, ids): |
nothing calls this directly
no test coverage detected