Click here to Skip to main content
15,889,876 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Algorithm Pin
honglomong940@gmail.com29-Apr-16 22:50
honglomong940@gmail.com29-Apr-16 22:50 
AnswerRe: Algorithm Pin
Patrice T18-Apr-16 5:46
mvePatrice T18-Apr-16 5:46 
QuestionDealing with arbitrarily large power of 10 numbers Pin
Member 1168325115-Apr-16 3:52
Member 1168325115-Apr-16 3:52 
SuggestionRe: Dealing with arbitrarily large power of 10 numbers Pin
Richard Deeming15-Apr-16 4:21
mveRichard Deeming15-Apr-16 4:21 
GeneralRe: Dealing with arbitrarily large power of 10 numbers Pin
Member 1168325115-Apr-16 8:45
Member 1168325115-Apr-16 8:45 
AnswerRe: Dealing with arbitrarily large power of 10 numbers Pin
Eddy Vluggen15-Apr-16 5:00
professionalEddy Vluggen15-Apr-16 5:00 
AnswerRe: Dealing with arbitrarily large power of 10 numbers Pin
Kenneth Haugland15-Apr-16 14:43
mvaKenneth Haugland15-Apr-16 14:43 
AnswerRe: Dealing with arbitrarily large power of 10 numbers Pin
Mark.io5-May-16 1:56
Mark.io5-May-16 1:56 
It may be a good idea to create a struct or class I'll call it LN which has a private vector with intergers VEC in the range of 0 to 9. The class has functions for Algebraic operations (+,-,*,/) to add two LN together. These functions must:
- determine the sizes of both VEC and resize accordingly.
- iterate though both VEC and execute the operation digit by digit.
Since vectors are dynamically allocated, you have virtually no cap on how many digits the number has (accept for RAM).
You'll have to replace all score related constant values in your code with LN's


I'm not sure how your game mechanics are designed, but if you have many hundreds of entities which add some constant value per second, it might be a good idea to have a single variable X which is added to the game score S every second, instead of iterating through all entities and adding the constant value to S. That is, when an entity is created, it adds it value per second constant E to X and when the entity is destroyed it subtracts E from X.
In every game step you then add X to S. This therefore only requires a single addition operation per game step and of course an addition operation when creating or destroying an entity.
GeneralRe: Dealing with arbitrarily large power of 10 numbers Pin
Member 116832518-May-16 22:15
Member 116832518-May-16 22:15 
AnswerRe: Dealing with arbitrarily large power of 10 numbers Pin
Daniel Pfeffer8-May-16 22:36
professionalDaniel Pfeffer8-May-16 22:36 
Question~difficult~ finding combination from K arrays Pin
Member 1245958914-Apr-16 6:27
Member 1245958914-Apr-16 6:27 
GeneralRe: ~difficult~ finding combination from K arrays Pin
Richard MacCutchan14-Apr-16 20:43
mveRichard MacCutchan14-Apr-16 20:43 
QuestionCompression algorithms Pin
Member 121468278-Apr-16 9:38
Member 121468278-Apr-16 9:38 
AnswerRe: Compression algorithms Pin
Dave Kreskowiak8-Apr-16 10:37
mveDave Kreskowiak8-Apr-16 10:37 
GeneralRe: Compression algorithms Pin
Patrice T9-Apr-16 0:54
mvePatrice T9-Apr-16 0:54 
AnswerRe: Compression algorithms Pin
Patrice T9-Apr-16 0:54
mvePatrice T9-Apr-16 0:54 
AnswerRe: Compression algorithms Pin
Alan Balkany9-May-16 4:46
Alan Balkany9-May-16 4:46 
AnswerRe: Compression algorithms Pin
Rupinder Singh thind27-Jun-16 1:37
Rupinder Singh thind27-Jun-16 1:37 
Questionwhich mathematical subjects I need to know for learning algorithms Pin
Mur25018-Apr-16 6:15
Mur25018-Apr-16 6:15 
AnswerRe: which mathematical subjects I need to know for learning algorithms Pin
Richard MacCutchan8-Apr-16 6:27
mveRichard MacCutchan8-Apr-16 6:27 
GeneralRe: which mathematical subjects I need to know for learning algorithms Pin
Mur25018-Apr-16 6:40
Mur25018-Apr-16 6:40 
GeneralRe: which mathematical subjects I need to know for learning algorithms Pin
Richard MacCutchan8-Apr-16 7:11
mveRichard MacCutchan8-Apr-16 7:11 
AnswerRe: which mathematical subjects I need to know for learning algorithms Pin
Sascha Lefèvre8-Apr-16 22:02
professionalSascha Lefèvre8-Apr-16 22:02 
AnswerRe: which mathematical subjects I need to know for learning algorithms Pin
Mark.io5-May-16 2:11
Mark.io5-May-16 2:11 
AnswerRe: which mathematical subjects I need to know for learning algorithms Pin
Alan Balkany9-May-16 4:50
Alan Balkany9-May-16 4:50 

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.