• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Matrices in Java

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm about to start work on an artificial intelligence program for Java. (Sounds like fun!)
I'm looking for a class that is a bit like a 2 dimensional ArrayList. I know I could use a 2d Array, but I'd like to be able to do things like insert rows/columns at particular places, label rows/columns with Objects, and use those labels to retrieve values in particular cells.
Has anybody had any experience with this sort of utility class, or have you seen any open source projects that do this sort of thing? (I haven't.)
Note that I want to store objects rather than numbers in the matrix.
Thanks in advance for any help!
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about an ArrayList of ArrayLists?
 
reply
    Bookmark Topic Watch Topic
  • New Topic