This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing MultiDimensional Vectors

 
Omo Jesu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Forum,

Please I need help on how to implement multidimensional vectors. I alerady have a working program that does everything using arrays and multidimensional arrays. Now I need to store the input and output information needed in a file. At the beginning of the program, they need to be stored in a vector and at the end from the vectors, they need to be stored back into the file.

How am I to implement the multidimensional vector. Ideas will be highly appreciated.

Regards
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Multidimensional Arrays= Array of arrays, similarly Multidimensional Vectors will be Vector of Vectors.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48949
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean vector or Vector? You ought not to use the Vector class, but use ArrayList instead.
If you really did mean vector, you would have to work out what the algorithm or mathematical form is before trying to implement anything.
 
Omo Jesu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean Vectors...
 
Campbell Ritchie
Sheriff
Pie
Posts: 48949
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you really want a Vector, Mohammed Sanaulla gave the solution last week.
You are better off with ArrayListThat allows you to add different types of List<T> to the created List object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic