Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Table data structure in C ?

Reply
Thread Tools

Table data structure in C ?

 
 
Richard
Guest
Posts: n/a
 
      07-04-2003

Does anyone know of a fast implementation of a "table" data structure--
an arbitrary number of columns and rows--with the features of fast field
location and update, along with the ability to quickly add and delete
columns and rows? Something including the algorithm analysis would be
an even niftier thing to see.

It's gotta be sound enough to be reasonably equivalent in performance at
the two extremes: lots of rows and only a few columns, or a lot of
columns with only a few rows.

I'm thinking I'm smoking crack here just to think there is such a thing,
but then I'm thinking odds are pretty good that I don't know everything.

GNU GCC 3.3, but I'd prefer not to use any funny language extensions.
 
Reply With Quote
 
 
 
 
Dann Corbit
Guest
Posts: n/a
 
      07-04-2003
"Richard" <(E-Mail Removed)> wrote in message
news:MPG.196ec04c224c22eb989b43@199.45.49.11...
>
> Does anyone know of a fast implementation of a "table" data structure--
> an arbitrary number of columns and rows--with the features of fast field
> location and update, along with the ability to quickly add and delete
> columns and rows? Something including the algorithm analysis would be
> an even niftier thing to see.
>
> It's gotta be sound enough to be reasonably equivalent in performance at
> the two extremes: lots of rows and only a few columns, or a lot of
> columns with only a few rows.
>
> I'm thinking I'm smoking crack here just to think there is such a thing,
> but then I'm thinking odds are pretty good that I don't know everything.
>
> GNU GCC 3.3, but I'd prefer not to use any funny language extensions.


You really want news:comp.programming

If the columns are all the same type, look do a web search for "sparse
matrix"

If you are going to model a database, then model a field first. Then model
a row as a list of fields. Then model a table as a list of rows. That way,
row operations are fast. Column operations will be a bit tedious, but not
atrocious.
--
C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
"The C-FAQ Book" ISBN 0-201-84519-9
C.A.P. FAQ: ftp://cap.connx.com/pub/Chess%20Anal...ject%20FAQ.htm

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple structure and copying data to pointer of the same structure A C++ 27 04-16-2011 11:07 PM
Copy String structure "A" to string structure "B" Leo Nunez C Programming 3 02-09-2005 05:14 AM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Pointers to structure and array of structure. Excluded_Middle C Programming 4 10-26-2004 05:39 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments