Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello folks,

 

I am currently making a program thats going to be doin quite a bit of number crunching. Basically its going to be predicting results of an experiment. So i am having an array which stores more arrays to get information about the ingredients to the experiment. I have a choice here and this is where im stuck.

 

I currently have a very pretty calculating dialog which was intended to do all of the number crunching. When this has finished calculating, it will give all of the results to a new form where it will be displayed graphically. Now do I

 

a) store the array in a module or class and let the new results form calculate everything

 

or

 

b) store the array locally in the calculating form and have it draw the graph before the form has loaded.

 

Any thoughts would be appreciated. I cant seem to go anywhere until I have decided and... I cant decide!

 

Predicament.

 

Cheers folks

 

Chris

Chris
  • Administrators
Posted
Storing the data in it's own class will probably give you more flexability. If you require different ways of charting / displaying the data you can simply add new forms and get them all to reference the class rather than combining the calculation and output code in one place.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
good point. ok, heres another one to think about. Really what i would like to do is let the user wait with the calculating screen rather than with a slowly completing form as it loads. What about if i were to use the data stored in the array of arrays to calculate in the "calculating" form and then have that output to an array in a class which is suitable for displaying things graphically. Would that be worth it? or is there any other alternatives that i havent thought about?
Chris
  • Administrators
Posted
You could also investigate using multiple threads - the class could do the calculations in the background and the forms could show the results as they were generated - it may be a pain if the user changes something but it would be better for them if they could see it going wrong, fix and restart early on rather than having to wait for the entire process to finish before they know there was a problem.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...