aspose file tools*
The moose likes Beginning Java and the fly likes Implementing MultiDimensional Vectors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Implementing MultiDimensional Vectors " Watch "Implementing MultiDimensional Vectors " New topic
Author

Implementing MultiDimensional Vectors

Omo Jesu
Greenhorn

Joined: Nov 30, 2010
Posts: 19
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

Joined: Sep 08, 2007
Posts: 3071
    
  33

Multidimensional Arrays= Array of arrays, similarly Multidimensional Vectors will be Vector of Vectors.


Mohamed Sanaulla | My Blog
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39396
    
  28
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

Joined: Nov 30, 2010
Posts: 19
I mean Vectors...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39396
    
  28
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing MultiDimensional Vectors