Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Large data sets Pin
ha_ha_ha19-Sep-05 8:42
ha_ha_ha19-Sep-05 8:42 
GeneralRe: Large data sets Pin
Obliterator21-Sep-05 4:15
Obliterator21-Sep-05 4:15 
GeneralRe: Large data sets Pin
ha_ha_ha23-Sep-05 5:06
ha_ha_ha23-Sep-05 5:06 
AnswerRe: Large data sets Pin
Bob Stanneveld19-Sep-05 8:06
Bob Stanneveld19-Sep-05 8:06 
GeneralRe: Large data sets Pin
Obliterator21-Sep-05 4:18
Obliterator21-Sep-05 4:18 
AnswerRe: Large data sets Pin
El Corazon19-Sep-05 8:49
El Corazon19-Sep-05 8:49 
GeneralRe: Large data sets Pin
Obliterator21-Sep-05 4:51
Obliterator21-Sep-05 4:51 
GeneralRe: Large data sets Pin
El Corazon21-Sep-05 6:06
El Corazon21-Sep-05 6:06 
Obliterator wrote:
I need to be able to produce calculations based on each point in turn, to rapidly access sections of points within the list and to be able to move both forwards and backwards through the list.

Well, I may be reading too much into that... but that sounds like a list container rather than a vector. It may be splitting hairs, but a vector is considering the whole data-set as a single item, you need to reference the whole rapidly and intereferencing each other -- basically a far more powerful array data-type. When you allocate memory you allocate as a whole rather than in pieces, so you must have a large contiguous section of memory. This is why re-allocation of vectors is more difficult. if you have allocated 100000 items in memory, but access 100001th item, the vector container class automatically allocates 150000 items in a new location in memory, and copies the previous 100000 values into the new memory location, frees teh old 100000 item memory group (which subsequently fragments contiguous memory), and only THEN allows you to access the 100001th item in what ever operation you had intended. But suddenly you are working with a new location for all items in the vector.

If all you are worried about is going through the data, backwards forwards or seeking a new location and starting backwards and forwards, then you can do a list container. The primary difference is a list container allocates each item independantly and links it to those around it. you can move backwards and fowards rapidly, you can "search" for a jump place not so rapidly. It depends on how often you jump to a new location and start calculations again. A strong advantage is allocation does not fragment memory by constant reallocation and freeing of heap memory. The disadvantage is that you cannot address the item as a whole by jumping randomly within in a reasonable time frame.

_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
GeneralRe: Large data sets Pin
Obliterator21-Sep-05 6:49
Obliterator21-Sep-05 6:49 
GeneralRe: Large data sets Pin
El Corazon21-Sep-05 15:21
El Corazon21-Sep-05 15:21 
GeneralRe: Large data sets Pin
Jörgen Sigvardsson19-Sep-05 10:43
Jörgen Sigvardsson19-Sep-05 10:43 
GeneralRe: Large data sets Pin
Obliterator21-Sep-05 4:43
Obliterator21-Sep-05 4:43 
GeneralRe: Large data sets Pin
Jörgen Sigvardsson21-Sep-05 9:25
Jörgen Sigvardsson21-Sep-05 9:25 
Questionwhere to define "Enable3dControlsStatic();" Pin
valerie9919-Sep-05 5:34
valerie9919-Sep-05 5:34 
AnswerRe: where to define "Enable3dControlsStatic();" Pin
David Crow19-Sep-05 7:40
David Crow19-Sep-05 7:40 
AnswerRe: where to define "Enable3dControlsStatic();" Pin
Michael Dunn19-Sep-05 16:03
sitebuilderMichael Dunn19-Sep-05 16:03 
GeneralRe: where to define "Enable3dControlsStatic();" Pin
David Crow21-Sep-05 3:36
David Crow21-Sep-05 3:36 
GeneralRe: where to define "Enable3dControlsStatic();" Pin
Michael Dunn22-Sep-05 6:15
sitebuilderMichael Dunn22-Sep-05 6:15 
GeneralRe: where to define "Enable3dControlsStatic();" Pin
David Crow22-Sep-05 6:59
David Crow22-Sep-05 6:59 
GeneralRe: where to define "Enable3dControlsStatic();" Pin
Michael Dunn22-Sep-05 7:10
sitebuilderMichael Dunn22-Sep-05 7:10 
NewsNetworking Pin
sebastianos19-Sep-05 4:51
sebastianos19-Sep-05 4:51 
Question[Message Deleted] Pin
valerie9919-Sep-05 4:45
valerie9919-Sep-05 4:45 
AnswerRe: The one and only object been double defined Pin
MailtoGops19-Sep-05 4:59
MailtoGops19-Sep-05 4:59 
Generalthanks, the Dlg is not getting value Pin
valerie9919-Sep-05 5:28
valerie9919-Sep-05 5:28 
GeneralRe: thanks, the Dlg is not getting value Pin
David Crow19-Sep-05 7:43
David Crow19-Sep-05 7:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.