switching values fast




Hi,

I wrote a program which needs to switch very fastly the contents of
array data . I used to this as follows :

for(int y=0; y<clone.height-1; y++){
for(int x=0; x<clone.width/2-1; x++){
int dummyvar = clone.get(x,y) ;
clone.set(x,y,clone.get(clone.width-x,y)) ;
clone.set(clone.width-x,y,dummyvar) ;
}
}

Would there be a faster way for switching the data than using a dummy
variable ?

--
Erik

Attachment:pgpvBp6tYLrPk.pgp
Description: PGP signature



Relevant Pages

  • Combined RC/IC tonight
    ... A big congrats to Eliza for squeaking ahead of Erik at the bottleneck. ... just point blank asked Amanda if she had tried to get her to switch sides, ... then asked Cirie the same thing. ... Ozzy was the reason. ...
    (alt.tv.survivor)
  • Re: Third hand, Trick 1
    ... Dummy comes down with a singleton in that suit. ... only third hand is likely to know whether dummy should be tapped. ... similar holding in both suits or that a switch to either suit might be ...
    (rec.games.bridge)
  • probability of a dummy pops up
    ... whether a dummy pops up or not. ... If the switch points at "up", the dummy will pop up, if it points at ... the probability that the dummy pops up is 20%. ...
    (sci.math)
  • Re: Auto Insert Notification and now More- Windows XP
    ... - when connected directly to the adapter, ... If they're not working correctly at all times when the switch isn't ... of the dummy, but it's not a thing that you can easily make ... KVM switches is to make sure the switch is set so that the computer ...
    (rec.audio.pro)
  • Re: Tuning into a dummy load.
    ... If I switch my ATU to Dummy load.. ... so now when the switch is returned to antenna 1 or antenna 2 which are not resonant obviously the meter shows a mismatch. ... They are usually tuning a linear rather than the ATU, I don't know why it takes them so long to tune. ...
    (uk.radio.amateur)