Click here to Skip to main content
15,899,586 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: how to convert plural word to singular? Pin
User 171649214-Nov-08 1:39
professionalUser 171649214-Nov-08 1:39 
QuestionTable comparison material Pin
aggressor_us12-Nov-08 13:29
aggressor_us12-Nov-08 13:29 
AnswerRe: Table comparison material Pin
Member 419459315-Nov-08 12:22
Member 419459315-Nov-08 12:22 
GeneralRe: Table comparison material Pin
aggressorus17-Nov-08 6:09
aggressorus17-Nov-08 6:09 
GeneralRe: Table comparison material Pin
Member 419459317-Nov-08 12:40
Member 419459317-Nov-08 12:40 
GeneralRe: Table comparison material Pin
aggressorus9-Dec-08 7:13
aggressorus9-Dec-08 7:13 
QuestionBuffering data for delimiter seperated blocks (theoretical question) Pin
invictus311-Nov-08 11:29
invictus311-Nov-08 11:29 
AnswerRe: Buffering data for delimiter seperated blocks (theoretical question) Pin
Arash Partow12-Nov-08 0:57
Arash Partow12-Nov-08 0:57 
You're right reallocation can be very costly, one solution I've seen to be quiet effective is to have a memory pool (set of buffers of common length) and have your stream maintain the chaining, as more memory is required (using a linked-list like approach) chain-in more blocks of memory from the pool.

Finally (socket example) when the frame, packet or token has arrived, provide per item(char usually) iterator access to the chain of buffers so as to make the chain transparent to the end user.

This obviously has its limits as well, specifically the largest block you can read will be the size of the pool of memory, however due to the design choice, if you ever reach that limit all you need to do is create more memory blocks in the pool which is much cheaper than realloc'ing everything accumulated so far.
AnswerRe: Buffering data for delimiter separated blocks (theoretical question) Pin
Alan Balkany12-Nov-08 3:37
Alan Balkany12-Nov-08 3:37 
QuestionConstructing a convex hull. Pin
Member 419459311-Nov-08 8:56
Member 419459311-Nov-08 8:56 
AnswerRe: Constructing a convex hull. Pin
Arash Partow12-Nov-08 0:45
Arash Partow12-Nov-08 0:45 
GeneralRe: Constructing a convex hull. Pin
Member 419459312-Nov-08 4:58
Member 419459312-Nov-08 4:58 
GeneralRe: Constructing a convex hull. Pin
Member 419459312-Nov-08 5:13
Member 419459312-Nov-08 5:13 
QuestionLimit finding Pin
Hadi Dayvary6-Nov-08 10:19
professionalHadi Dayvary6-Nov-08 10:19 
AnswerRe: Limit finding Pin
73Zeppelin6-Nov-08 10:26
73Zeppelin6-Nov-08 10:26 
GeneralRe: Limit finding Pin
Hadi Dayvary6-Nov-08 10:37
professionalHadi Dayvary6-Nov-08 10:37 
GeneralRe: Limit finding Pin
BobInNJ6-Nov-08 12:57
BobInNJ6-Nov-08 12:57 
GeneralRe: Limit finding Pin
bulg6-Nov-08 13:59
bulg6-Nov-08 13:59 
GeneralRe: Limit finding Pin
73Zeppelin6-Nov-08 21:13
73Zeppelin6-Nov-08 21:13 
GeneralRe: Limit finding Pin
Hadi Dayvary7-Nov-08 9:43
professionalHadi Dayvary7-Nov-08 9:43 
GeneralRe: Limit finding Pin
73Zeppelin7-Nov-08 18:44
73Zeppelin7-Nov-08 18:44 
GeneralOff-Topic Pin
soap brain8-Nov-08 1:16
soap brain8-Nov-08 1:16 
GeneralRe: Off-Topic Pin
User 17164928-Nov-08 1:38
professionalUser 17164928-Nov-08 1:38 
GeneralRe: Off-Topic Pin
soap brain8-Nov-08 1:48
soap brain8-Nov-08 1:48 
GeneralRe: Off-Topic Pin
Member 41945938-Nov-08 3:34
Member 41945938-Nov-08 3:34 

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.