Re: dynamic double array

klynn47_at_comcast.net
Date: 02/02/05


Date: 2 Feb 2005 14:15:29 -0800

Vectors only hold object references, but you could store the doubles in
Double and store them in the Vector and then later create an array of
doubles whose size is equal to the size of the Vector and then one by
one turned the elements in the Vector into doubles.

Another way would be to concatenate each new double into a String and
delimit the doubles with some character like ;, and then use split to
turn it into an array of Strings, and then create an array of double of
the same size and one by one turn the Strings into doubles.



Relevant Pages

  • Re: DataType for storing pointlist (x,y,z)?
    ... Using vb6, ado, writing to mdb format ... If I want to store an array of 3 doubles, what would be best for the data ...
    (microsoft.public.vb.database.ado)
  • Re: string.Format with arrays
    ... > The following variations of string.Formatwill work just fine with strings: ... > And I can format a list of doubles like this: ... > Why does the array version work with strings but not doubles? ... An array of doubles isn't an array of object references, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: sort 1-D array of doubles for Olaf Schmidt
    ... but I just wanted to alter Olaf's code so that it would handle a 1-D array of doubles rather than a 1-D array of ... If you're looking for speed then you don't want to be shifting strings or doubles about at all, ...
    (microsoft.public.vb.general.discussion)
  • PowerMean
    ... Demonstrate various ways of summarising/averaging a list of doubles ... @param numbers array of doubles ... double sum = 0; ...
    (comp.lang.java.help)
  • Re: indirect sort
    ... I wrote a Comparator and ... ... Is there a way to create a doublearray of my fields I want to sort by, sort that array and then recover the permutation? ... As i'm sure you've realised, you could write something of your own without too much trouble - just do a normal sort, but keep a side array of the objects, intitially set to the range from 0 to N-1, and every time you swap doubles, swap objects too. ...
    (comp.lang.java.programmer)