Hi there
I need help with a tricky problem.
I have a 2 dimensional array with qualities such as
ball size, ball color, ball weight.
Now I have to print out all the possible combinations of this.
assume I have it stored as such
i have two dimensional array ball:
ball (x,y)
x = the number of possible things a ball can be, like color, size ,weight,
bounce height, smootheness for example.
y = is that feature like red,green, blue - 3 inches, 2 inches - 3 lbs, 1
lbs - 3 feet hi, 1 foot hi, 5 ft hi - smooth, rough, bumpy
now, how can I loop thru this array and pring all the combinations:
like bal(0,0) + bal(1,0) + ball(2,0) + ball(3,0)+ball(4,0)= red+2inches+3
lbs+3 feet hi+smooth
ball(0,0)+ball(1,0)+ball(2,0)+ball(3,0)+ball(4,1) = red+2inches+3lbs+3feet
hig+rough
etc
thanks in advance 5 1607
Do you want to do a numeric or a text field addition?? Your question is
unclear to me but I think I can give the answer if you spell out what you
want to achieve a bit more.
Do you want a string or a code or a number or what?
---
Please immediately let us know (by phone or return email) if (a) this email
contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system ( http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
Thanks for your response.
I would like the actual strings to show what the combinations are.
Assume the actual strings are already in the multidimensional array as show
in my post.
I just dont know how to loop through the array to build this string.
since you can really only access one element of the array at a time with the
loop
Would be great if you could help
Thanks
"WindAndWaves" <ac****@ngaru.com> wrote in message
news:ZS*******************@news.xtra.co.nz... Do you want to do a numeric or a text field addition?? Your question is unclear to me but I think I can give the answer if you spell out what you want to achieve a bit more.
Do you want a string or a code or a number or what?
--- Please immediately let us know (by phone or return email) if (a) this
email contains a virus (b) you are not the intended recipient (c) you consider this email to be spam. We have done our utmost to make sure that none of the above are applicable. THANK YOU Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
On Thu, 20 May 2004 11:01:06 GMT, "Danny" <da********@hotmail.com>
wrote:
Try something like:
dim x as integer
dim y as integer
for x=0 to ubound(ball(1))
for y = 0 to ubound(ball(2))
debug.print "ball(" & x & "," & y & ")=" & ball(x,y)
next y
next x
-Tom. Hi there
I need help with a tricky problem. I have a 2 dimensional array with qualities such as ball size, ball color, ball weight.
Now I have to print out all the possible combinations of this.
assume I have it stored as such i have two dimensional array ball: ball (x,y) x = the number of possible things a ball can be, like color, size ,weight, bounce height, smootheness for example. y = is that feature like red,green, blue - 3 inches, 2 inches - 3 lbs, 1 lbs - 3 feet hi, 1 foot hi, 5 ft hi - smooth, rough, bumpy
now, how can I loop thru this array and pring all the combinations: like bal(0,0) + bal(1,0) + ball(2,0) + ball(3,0)+ball(4,0)= red+2inches+3 lbs+3 feet hi+smooth ball(0,0)+ball(1,0)+ball(2,0)+ball(3,0)+ball(4, 1) = red+2inches+3lbs+3feet hig+rough
etc
thanks in advance
This just prints each feature out, I need to print out all possbile
combinations.
like:
red+2inches+3lbs+3 feet hi+smooth
not just
red
2inches
3 lbs
3 feet hi
smooth
This is tricky
"Tom van Stiphout" <to*****@no.spam.cox.net> wrote in message
news:ks********************************@4ax.com... On Thu, 20 May 2004 11:01:06 GMT, "Danny" <da********@hotmail.com> wrote: Try something like: dim x as integer dim y as integer for x=0 to ubound(ball(1)) for y = 0 to ubound(ball(2)) debug.print "ball(" & x & "," & y & ")=" & ball(x,y) next y next x
-Tom.
Hi there
I need help with a tricky problem. I have a 2 dimensional array with qualities such as ball size, ball color, ball weight.
Now I have to print out all the possible combinations of this.
assume I have it stored as such i have two dimensional array ball: ball (x,y) x = the number of possible things a ball can be, like color, size
,weight,bounce height, smootheness for example. y = is that feature like red,green, blue - 3 inches, 2 inches - 3 lbs, 1 lbs - 3 feet hi, 1 foot hi, 5 ft hi - smooth, rough, bumpy
now, how can I loop thru this array and pring all the combinations: like bal(0,0) + bal(1,0) + ball(2,0) + ball(3,0)+ball(4,0)= red+2inches+3 lbs+3 feet hi+smooth ball(0,0)+ball(1,0)+ball(2,0)+ball(3,0)+ball(4, 1) =
red+2inches+3lbs+3feethig+rough
etc
thanks in advance
On Thu, 20 May 2004 15:11:46 GMT, "Danny" <da********@hotmail.com>
wrote:
Now I'm confused. It appears you want all permutations, but that
wouldn't make sense if the data is stored in a 2-dimensional array.
-Tom. This just prints each feature out, I need to print out all possbile combinations. like: red+2inches+3lbs+3 feet hi+smooth not just red 2inches 3 lbs 3 feet hi smooth
This is tricky
"Tom van Stiphout" <to*****@no.spam.cox.net> wrote in message news:ks********************************@4ax.com.. . On Thu, 20 May 2004 11:01:06 GMT, "Danny" <da********@hotmail.com> wrote: Try something like: dim x as integer dim y as integer for x=0 to ubound(ball(1)) for y = 0 to ubound(ball(2)) debug.print "ball(" & x & "," & y & ")=" & ball(x,y) next y next x
-Tom.
>Hi there > >I need help with a tricky problem. >I have a 2 dimensional array with qualities such as >ball size, ball color, ball weight. > >Now I have to print out all the possible combinations of this. > >assume I have it stored as such >i have two dimensional array ball: >ball (x,y) >x = the number of possible things a ball can be, like color, size,weight, >bounce height, smootheness for example. >y = is that feature like red,green, blue - 3 inches, 2 inches - 3 lbs, 1 >lbs - 3 feet hi, 1 foot hi, 5 ft hi - smooth, rough, bumpy > >now, how can I loop thru this array and pring all the combinations: >like bal(0,0) + bal(1,0) + ball(2,0) + ball(3,0)+ball(4,0)= red+2inches+3 >lbs+3 feet hi+smooth >ball(0,0)+ball(1,0)+ball(2,0)+ball(3,0)+ball(4, 1) =red+2inches+3lbs+3feet >hig+rough > >etc > >thanks in advance > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Felix |
last post by:
Dear Sql Server experts:
First off, I am no sql server expert :)
A few months ago I put a database into a production environment.
Recently, It was brought to my attention that a particular...
|
by: Jerry Brenner |
last post by:
Our users have potentially dirty legacy data that they need to get
into our application. We provide a set of staging tables, which map
to our source tables, that the users do their ETL into. ...
|
by: Sky Fly |
last post by:
Hello all,
I've written a stored procedure which runs OK for the
first few thousand records it processes, then around
about the 10,000th record it suffers a sudden and dramatic
drop in...
|
by: Metal Dave |
last post by:
Hello,
A script we run against the database as part of the upgrade of our product
is failing with the following message:
ALTER TABLE ALTER COLUMN EncodedID failed because STATISTICS hind_61_3...
|
by: Ross A. Finlayson |
last post by:
Hi,
I wonder if there is a simple library or set of functions for basic
statistical functions, like what may be on a pocket calculator, without
getting into linking into the language runtimes of...
|
by: romixnews |
last post by:
Hi,
I'm facing the problem of analyzing a memory allocation dynamic and
object creation dynamics of a very big C++ application with a goal of
optimizing its performance and eventually also...
|
by: Allan Ebdrup |
last post by:
Hi
We have a large class library of different classes, now we are going to
implement a lot of usage statistics that we need, stuff like how many times
a user has logged in, how many times a...
|
by: Quasar |
last post by:
Hi everybody!
I''ve created a script that enable the statistics for a specific DB:
#!/bin/sh
if ; then
echo Enabling monitoring switches for ${1}
db2 connect to ${1}
db2 update monitor...
|
by: w.l.fischer |
last post by:
Is it possible to have statistics on temporary tables? I frequently
put 10000 or more rows in a temporary table and would like to know it
the queries become faster with statistics on those tables.
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |