(f, schema)
| 43 | |
| 44 | def gen_node_data(id_type, id_range, schema, mask=""): |
| 45 | def write_meta(f, schema): |
| 46 | meta = 'id:int64' |
| 47 | if WEIGHTED in schema: |
| 48 | meta += '\tweight:float' |
| 49 | if LABELED in schema: |
| 50 | meta += '\tlabel:int64' |
| 51 | if ATTRIBUTED in schema: |
| 52 | meta += '\tfeature:string' |
| 53 | meta += '\n' |
| 54 | f.write(meta) |
| 55 | |
| 56 | def write_data(f, value, schema): |
| 57 | line = '%d' % value |
no outgoing calls