home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!mips!darwin.sura.net!wupost!gumby!destroyer!news.iastate.edu!tc4.fi.ameslab.gov!raeker
- From: raeker@tc4.fi.ameslab.gov (Todd J. Raeker)
- Newsgroups: comp.lang.c
- Subject: array element swapping
- Message-ID: <1992Jul30.161048.25439@news.iastate.edu>
- Date: 30 Jul 92 16:10:48 GMT
- Sender: news@news.iastate.edu (USENET News System)
- Reply-To: raeker@tc4.fi.ameslab.gov (Todd J. Raeker)
- Organization: Ames Laboratory
- Lines: 22
-
- I need to swap values in an array while sorting it, currently I am doing
- the swap as follows on floats
-
-
- temp = ztmp[j];
- ztmp[j] = ztmp[k];
- ztmp[k] = temp;
-
-
- This is currently a bottleneck in my program and I need to figure a
- better way to do due this. Since I am not an advanced c programmer, this
- is the best I could come up with, is there a more efficient way?
-
- Thanks
-
- --
-
-
- Dr. Todd J. Raeker | 307B Wilhelm Hall
- raeker@tc4.fi.ameslab.gov | Iowa State University
- Phone (515)-294-9927 | Ames Laboratory, USDOE
- FAX (515)-294-5204 | Ames, Iowa 50011
-