Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Other Sciences
Programming and Computer Science
Question about input format file (for creating a net)
Reply to thread
Message
[QUOTE="jedishrfu, post: 5901736, member: 376845"] A net can be defined as structured data or as tabular data. JSON and XML are pretty much two ways to store structured data in a text file format. CSV format is good for tabular data. I would choose CSV if I only needed to edit specific node contents but not its connections. I also would only use CSV if each node had no more than n connections with being 6 or less like north south east west up down directions. Otherwise I’d go with JSON as it is less of a hassle to parse when reading in. One advantage XML brings is that you can label each node with a name and ID that you can use to locate its connecting nodes in your file. XML parsing is sensitive to proper begin and tagging and may get when you make a mistake during an edit. Property files are another way you could consider where you use property keys that identify the node and it’s attributes. Node1.text=xxxxxxxxx Node1.east=Node5 ... In each of these cases you don’t really want to store more than 10,000 lines of text as that becomes cumbersome for a text editor. The last option would be an application specific sql database using a table to hold your node information and using sql to traverse your net. This could free you from potential size limitations that the other schemes impose for in memory storage. The last option would be to use a serialization scheme like in Java and store node info in binary. Your program builds and maintains the net and you never look at the binary serialization. You also need to mark nodes as you save them be sure you don’t get caught in a loop. [/QUOTE]
Insert quotes…
Post reply
Forums
Other Sciences
Programming and Computer Science
Question about input format file (for creating a net)
Back
Top