J
jason
Hello,
I have a question about what kind of datastructure to use. I'm reading
collumn based data in the form of:
10\t12\t9\t11\n
24\t11\t4\t10\n
.....
I now have a structure which allows me to access the data like this:
x->row.coll[0].value.d;
where coll is a structure containing a union and the type of data used in
this field. x->row.coll[0].utype ;
However in my inexperience I forgot that most of the functions I want to
use on this data accept arrays only - Now I have added an extra step to
create an array of pointers linking to all the values in the
collumn.unions.
When I think of it [what I should have done before starting to program] I
have three choices;
Leave it this way disregarding the extra overhead of creating an array of
pointers, but maintaining all the preferences of each field.
Remove the union and create void pointers
or at runtime create an array for each collumn and a `super' structure
that holds all the preferences of each collumn.
Again I'm not very experienced with this - but what would be the best way
to go for storing this type of data in such way that it becomes easy to
preform operations on it ?
Any suggestions are welcome.
Thank you.
Jas.
I have a question about what kind of datastructure to use. I'm reading
collumn based data in the form of:
10\t12\t9\t11\n
24\t11\t4\t10\n
.....
I now have a structure which allows me to access the data like this:
x->row.coll[0].value.d;
where coll is a structure containing a union and the type of data used in
this field. x->row.coll[0].utype ;
However in my inexperience I forgot that most of the functions I want to
use on this data accept arrays only - Now I have added an extra step to
create an array of pointers linking to all the values in the
collumn.unions.
When I think of it [what I should have done before starting to program] I
have three choices;
Leave it this way disregarding the extra overhead of creating an array of
pointers, but maintaining all the preferences of each field.
Remove the union and create void pointers
or at runtime create an array for each collumn and a `super' structure
that holds all the preferences of each collumn.
Again I'm not very experienced with this - but what would be the best way
to go for storing this type of data in such way that it becomes easy to
preform operations on it ?
Any suggestions are welcome.
Thank you.
Jas.