Re: DataType for storing pointlist (x,y,z)?



Hi Ralph,

"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:g6adnfDtRpyN-W_anZ2dnUVZ_jCdnZ2d@xxxxxxxxxxxxxxx

"MP" <NoSpam@xxxxxxxxxx> wrote in message
news:u4N25P1kIHA.484@xxxxxxxxxxxxxxxxxxxxxxx

If I want to store an array of 3 doubles, what would be best for the data
type of the field?

most likely the incoming data will be either a variant containing an
array
of (2 or 3) doubles
or the array itself (not wrapped in a variant)

It really depends on what these "doubles" mean and if you only have three
or
many.

the 2 or 3 doubles represent a pointlist (x, y, z)
there are either 2 or 3 (x, y) or (x, y, z)

for example, a line has a startpoint and an endpoint which in cartesian
coordinates could be expressed as two pointlists of 3 doubles each (x,y,z).

so if I want to store info in a table about a line i would have (at a
minimum)
fldObjID, fldStartPoint, fldEndpoint


I would be sorely tempted to KISS it off, and store a primary key and then
store the doubles in another associated table.

so in that table the doubles each get a field?
fldPtX
fldPtY
fldPtZ

I could see that working, if I'm understanding you correctly...<g>

so i could have a table tblPoints
with fldPtId, fldPtX, fldPtY, fldPtZ

then in tblLines
instead of ...
fldObjID, fldStartPoint (as adVariant), fldEndpoint (as adVariant)

I would have ...
fldObjID, fldStartPointID (as FK tblPoints:fldPtId), fldEndpointID (as
FK tblPoints:fldPtId)

is that the idea????


A simple getrows() could
provide a variant array.

-ralph
<g>


Thanks again, as always
:-)
mark


.



Relevant Pages

  • 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)
  • Very large memory problem
    ... I'm developing an application which I need to maintain a static array (more ... of 900.000 Doubles) in memory. ... it is increasied an error message appears: 'Out of memory'. ... pero con un array más grande me da un error de 'Out of memory' al crear el ...
    (comp.lang.java.programmer)
  • Re: nlffi and pointers
    ... >> An unboxed array of doubles should just have a pointer somewhere ... >> to the sequence of doubles in memory. ... All of the array information and then n consecutive memory ...
    (comp.lang.functional)
  • Re: confused about resizing array in Python
    ... You mentioned "it doubles in size". ... Are you saying that a new double sized array is allocated and the contents ... Say the list size is 100, before it is fully used, the append takes O ... memo = ...
    (comp.lang.python)

Loading