Results 1 to 3 of 3
- 02-19-2011, 06:35 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 1
- Rep Power
- 0
Spreadsheet data - linked list or hashmap
Hi,
I am looking to implement a spreadsheet in java. Would it be better to use a linked list (rows) of linked list of cells (columns) to store the data or a hashmap (each cell maps to a key e.g. A1 -> 1, A2-> 2 etc.)?
Or is there an even better data structure to use?
Thanks!
-
Cross-posting the same question in different forum on the net without notifying others is not appreciated and will quickly label you as someone many won't want to help. Please do the right thing and notify all cross-posts about the others.
- 02-19-2011, 07:20 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
On top of that: neither of those data structures are naive when it comes to cycle detection during the evaluation of your sheet; e.g.
A1 = A2+1
A2 = A1+1
Excel can detect those cycles but it abrubtly stops the evaluation of the entire sheet (which I find extremely stupid). Simple lists or hash maps are just too simple data structures to think about, better use a dependency graph (which has to be a DAG if you don't like cycles in the sheet).
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
Storing Mutiple Classes/Data Types in a Linked List
By Chronoattica in forum New To JavaReplies: 7Last Post: 12-28-2010, 10:03 PM -
How to create an array of linked list reading data from a file
By kool001 in forum New To JavaReplies: 1Last Post: 12-03-2009, 07:03 AM -
List API's that stores Spreadsheet using java
By britto_bics in forum AWT / SwingReplies: 1Last Post: 11-18-2009, 03:10 AM -
how can i get data from textFiels and Jcombo box to linked list
By the swan in forum AWT / SwingReplies: 0Last Post: 03-31-2009, 04:52 PM -
Doubly-linked list with data structure
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 10:30 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks