anvaka / ngraph.native

C++ implementation of force-based layout from ngraph
MIT License
51 stars 28 forks source link

Document use of weights.bin #9

Open zoellner opened 6 years ago

zoellner commented 6 years ago

I'm interested in experimenting with the weights.bin file. Could you document the format of the file and how to create one? I might then be able to create a PR to allow to pass in a flag through the command line to enable weights.

anvaka commented 6 years ago

When you have weights.bin file in the folder, the layouter will assign weight to each body in force simulation according to this file. Each record is an int32 value, corresponding to the weight of a body. Position of the record in the weights.bin, corresponds to node. Similar to how https://github.com/anvaka/ngraph.tobinary stores labels.

Does this make sense?