switching values fast
- From: Flatman <flatman@xxxxxxxx>
- Date: Fri, 16 Sep 2005 07:40:39 +0200
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
- Follow-Ups:
- Re: switching values fast
- From: Eric Sosman
- Re: switching values fast
- From: Remi Arntzen
- Re: switching values fast
- From: Roedy Green
- Re: switching values fast
- Prev by Date: Re: Client Termination With Java Sockets doesnt close socket
- Next by Date: Re: Client Termination With Java Sockets doesnt close socket
- Previous by thread: nio non-blocking io socket setSoTimeout
- Next by thread: Re: switching values fast
- Index(es):
Relevant Pages
|
|