We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 
copy 2d array (Read 2539 times)
Re: copy 2d array
Reply #15 - Apr 13th, 2009, 11:42pm
 
It seems to.

Are you having trouble doing something with the output?
Re: copy 2d array
Reply #16 - Apr 14th, 2009, 1:07am
 
yeah, I want a output that reports the ammount of each hue value so I always get a total of 76800.

I end the color array now like this:

 output.println("done");
 return sorted;
}

if I look in the output.txt it starts like this:

Quote:
0 76800

0 76800

done
done
0 76800

0 76800

done
done
0 76800

0 76800


After a while I have single "done"s instand of double and the total ammounts are less.

Quote:
done
136 2
175 1
180 1
184 1
206 1
210 1
255 44

done
255 11

done
1 93
2 18
3 74
4 85
5 4
6 4
7 17
8 10
9 5
10 50
11 7
12 2
13 4
14 1
15 12
17 2
18 1
19 1
20 1
21 4
22 10
23 1
25 2
26 2
27 4
28 3
29 2
30 6
31 2
32 4
33 3
34 2
35 1
37 1
41 2
42 1
53 1
68 1
69 1
73 1
83 1
88 2
91 1
98 1
104 1
105 1
107 1
111 1
112 1
114 1
117 1
175 3
176 1
182 1
183 1
207 1
210 1
212 2
213 1
216 2
217 2
224 2
225 1
248 2
249 1
251 2
252 4
254 4
255 134

done
252 3
255 2

done
43 1
44 1
172 1
195 1
206 1
207 1
210 3
214 3
217 1
220 1
221 1
252 4
Re: copy 2d array
Reply #17 - Apr 14th, 2009, 8:33am
 
Try changing the print part to:

Code:

if (depth == 0) {

for (int i =0; i<256; i++){
output.println(counts[i]);
}

}


That way, it should only print during the first scan.
Re: copy 2d array
Reply #18 - Apr 14th, 2009, 10:38am
 
whoot !!
finally, this also explains why I had text files that growth like 4mb/s Smiley

thx a lot!
Pages: 1 2