odd-even transposition sort

Can somebody help me with odd-even transposition sort?
If somebody have this code please send to me?

0
5/12/2007 5:07:52 PM
comp.parallel.mpi 1530 articles. 7 followers. kisitanggang (69) is leader. Post Follow

0 Replies
1391 Views

Similar Articles

[PageSpeed] 22
Reply:
Similar Artilces:

dict odd behavior? (or code is odd :)
dict set foo somefoo 0 running the code below will alternate between a value of 1 and the expected incremented value (output shown here is after 14 runs) % dict set foo somefoo [incr [dict get $foo somefoo]] somefoo 1 % dict set foo somefoo [incr [dict get $foo somefoo]] somefoo 15 It's been a long time since I've played with Tcl and just now getting back into it, so is my code just bad or is there something wrong with my Tcl build? You're incrementing a variable named 0 (which is what your first [dict get] returns). You're looking for [dict incr] On 6/12/2014...

Odd behaviour for time, timezone, timestamp...
I am trying to track down a problem with emacs timestamps, I have a new laptop running XP with ntemacs 21.3, and an older machine also XP running 21.2. The old machine correctly timestamps files, but the new machine timestamps them with UCT and I cannot figure out why. The two machines have identical .emacs files. Both have identical site files (the auctex site-start). Looking into how emacs interfaces with system time I find the following: (current-time) gives the same numbers on both machines (current-time-zone) gives the same result (0 "NZS") on both machines but (current-ti...

How to sort non-ascii characters?
Dear MATLAB users I want to sort a string that contains non-ascii charaters, such as Chinese Words. I found that MATLAB sort these character according with its double value. However, I want to sort them using another rule, for example 'PinYin' which represents its pronouncation. Here is an example, A =3D '=CE=D2=B0=AE=B1=B1=BE=A9=B5=D8=B0=B2=C3=C5' Using sort(A), we can get: =CE=D2=B0=AE=B1=B1=BE=A9=B5=D8=B0=B2=C3=C5 this sequence is sorted according to character's double value. Now I want to sort it according to its pronouncation, how can I do that? Best Regards mayi 200...

Even more questions and answers about video adapters
Q. Why don't the grayscale text modes appear grayscale? A. The grayscale modes allowed 16 shades of gray in text modes 0h, 02h, and graphics mode 05h instead of the 16 CGA palette. But these shades of gray were generated by the composite color generating circuitry of the CGA, PCjr., and EGA. If the display adapter does not contain composite video generating circuitry, (and RGB-composite converters do not count), then there will be no visible difference between the color and grayscale modes. The VGA, although it has the capability to produce 64 shades of gray, will not emula...

Odds and ends
Hi, A collection of things which really don=92t merit a thread of their own :) The recent discussion in the Ancient Armies thread regarding how difficult it is to find out about and get hold of the copyright holder to stuff released decades ago had me checking a thing or two regarding an old computer wargame which always gets top spot in =93What games should be remade=94 threads : Age of Rifles. Guess who=92s the owner of Age of Rifles ? our dear pal JR : http://www.findownersearch.com/age-of-rifles/4836288/ Some time ago Matrix confirmed they got the IP to computer versions ...

Stable sorting and SysSytemSort
IBM Object REXX explicitly documents that SysStemSort is not a "Stable" sort, that is, values with equal "keys" may not necessarily stay in their original order. In other words, if you sorted: Aardvark Andrews Arnold Azimuth � by just character position 1, then the resultant stem would not necessarily be in the original order. You can maintain the original order by adding the tail number to the actual data, sorting on your columns or choice, and adding the stem number as the least significant column in the sort. Then you have to strip the stem numbers back out agai...

here's an odd one
when I convert a normal mp3 song to aiff with mpecker it works fine but when i decode a large audio book segment (40 meg), the new aiff file appears as it's being converted but dissapears as soon as it's finished. Still prefer 9.2 althogh i use 10.2 for some things. Any ideas? In article <220320052129014479%scott@rr.com>, scott <scott@rr.com> wrote: > when I convert a normal mp3 song to aiff with mpecker it works fine but > when i decode a large audio book segment (40 meg), the new aiff file > appears as it's being converted but dissapears as soon as it'...

Odd change: no more bounding boxes in eps files
I am writing a paper in Latex. I spent a couple of weeks coding up a nice statistical analysis and getting nice plots to match. Then, after fiddling with it last night to debug something, somehow the code is no longer providing proper bounding boxes. I opened up a file in a text editor to see, and the bounding box is there, but there's some gibberish (binary?) in the first line of the file gumming up the works. Now, the reason I spent a lot of time on this when I wrote the code is so that the total non-computer geek who is replacing me could just point and type in a few things and repeat t...

Odd noise...?
About every ten minutes my iMac355 makes hard drive noise and all functions stop for about ten -fifteen seconds. Cursor will move but can't drag, open or close, type etc. Any audio/video stops also. Never used to happen (three years). Any ideas would be appreciated A.T. ...

Adding 1 to odd and 2 to even values of a matrix
Here is my code. I'm wondering what I can add to my code in order to add 1 to all the odd values, and add 2 to all of the even values of the matrix that is produced? I think there is a way to use a "mod" function, but I'm not that familiar with MATLAB or how to use that function. Can anyone HELP?? b= input('Enter a value for b'); c= input('Enter a value for c'); d= input('Enter a value for d'); e= input('Enter a value for e'); a= [b c; d e]; for i =1:2 for j =1:2 if i==1 if j==1 a(i,j)= a(i,j)+1; ...

keyed sorting and comparison functions
Does Haskell have keyed sorting and comparison functions like Python's? They are very handy. I couldn't find anything like them in the Data.List doc but I think they would be a good addition. Here is my version of a keyed sort, that is probably not very idiomatic, but makes the decorate-sort-undecorate strategy very explicit: sortKeyed :: Ord b => (a -> b) -> [a] -> [a] sortKeyed keyfunc xs = let map = Prelude.map decorate x = (keyfunc x, x); undecorate (kx, x) = x; d = map decorate xs; s = so...

Odd...
Both Snit and "Moshe" (flatline---) have escaped from my killfile -- both at the same time. Strange coincidence. -- RonB "There's a story there...somewhere" Snit wrote: > Yeah, we chipped in together and hired killer robotic sea horses to go > into your house and alter your computer settings.  You busted us, > detective. Well done! That must be it. Goodbye (again) troll. -- RonB "There's a story there...somewhere" "RonB" <ronb02NOSPAM@gmail.com> stated in post FX5uj.86$Pn5.21@newsfe05.lga on 2/17/08 7:18 PM: > Bot...

What sort of OS statistics do you monitor, how often and how?
The following questions are aimed at unix users (solaris in particular) who run multiple oracle databases on the same host. Was just wondering what are all the OS stats that you monitor and how often you sample them? For example, do you just monitor 1, 5 and 15 minute load every 15 minutes or do you do it more often? Do you monitor swapping or paging and and have thresholds set to alert you? What other things do you specifically monitor and do you check things daily or have warnings emailed? Do you have simple custom written scripts that monitor stats like top, sar, iostat and vmstat...

Odd behavior of python module listing
Yesterday I installed compiz-icon in my Ubuntu. Today, when I go to the python interpreter, I happen to do this: ### START OF PYTHON SESSION ### Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help() Welcome to Python 2.5! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://www.python.org/doc/tut/. Enter the name of any module, k...

Sorting mixtures of text and numeric fields in Delphi tables
Hello everyone, Unfortunately I'm revisiting the old chestnut of 'sorting'. I have a very large table that's being used within a Delphi application and I would like to sort the table via one of its fields. The end result is a Word document that's read by a user so the sorting has to be correct. As an illustration, let's pretend the table has a single field and that some of the entries are... SSC_1_1_VL1 SSC_1_1_VL10 SSC_1_1_VL2 SSC_1_1_VL11 SSC_1_1_VL3 SSC_1_1_VL12 SSC_11_1_VL13 As you would imagine, no matter what field type I assign to the fie...

TCPSocket, send always transmit an even length message
Hello all :) Just a quick and obscure bug report Console 1: $ irb > require 'socket' => true > s = TCPSocket.open('localhost', 2000) => #<TCPSocket:fd 3> > s.send('ab', 2) => 2 > s.send('cde', 3) => 3 Console 2: $ nc -l 2000 abcd Write seems to work OK and puts too, but I could swear I had the same issue with puts on another Ubuntu box with same specs and ruby 1.8.7. I'm using Ubuntu 10.10, 2.6.35-27 kernel and ruby 1.9.2-p180 and ruby 1.8.7. -- Posted via http://www.ruby-forum.com/. ...this is not a flushing issue...

PROC LOGISTIC help with obtaining Odds Ratios for main effects
Hi, I have conducted a logistic regression with 2 predictor variables. The first has 4 categories and the second has 2 categories (both predictors are included on the class statement to determine the reference categories). In addition to including the 2 predictor variables I have also included the interaction. I used the following statement to ensure that the main effects enter before the interaction term. /HIERARCHY= singleclass selection = stepwise include = 2 The problem I am having is obtaining the odds ratios for the main effects when the interaction is significant. When the interactio...

sort + external procedure tuning
Hello, I test a query on db2 udb v7.2 EE and Oracle8i EE. On db2 it took me less than 30s. On Orale server it took me 10m. My query is like: SELECT id1, function_name(col2, 'Str1', col3, 'Str2') FROM MyTable Order by 2 desc; We use C/C++ external procedure. My table size is about 500M, 1M rows. I don't want to argue why one is better than the other one. I just hope you can HELP me to improve the performance of the query on oracle server Win2K, 4 CPUs, 2G mem, Raid5(5 disk). The init.ora parameters I try to change is: DB_BLOCK_BUFFERS DB_BLOCK_LRU_LATCHES DB_FILE_MULTIBL...

Odd behaviour or normal?
I'm just starting to work with Java GUI code again for the first time in a long time and I've encountered some behaviour that may or may not be normal; I just don't remember. Perhaps someone here can tell me.... I have a class called TextInputPanel which subclasses JPanel. My subclass has a JLabel and a JTextField on it. My class has been working fine but today I added some trivial-seeming functionality and suddenly I got odd behaviour. All I did was to override the setForeground() and setBackground() methods of the parent class, just to control the specific colors of the f...

Re: Reflection & Qedit -- odd problem I never used to have...
function key labels? > -----Original Message----- > From: Emerson, Tom [mailto:Tom.Emerson@warnerbros.com] > Sent: Friday, July 11, 2003 9:49 AM > To: HP3000-L@RAVEN.UTC.EDU > Subject: Reflection & Qedit -- odd problem I never used to have... > > > I've got a problem that resides just below the "minor > annoyance" level, = > but is steadily rising. If, at some point during a session, I use = > QEDIT's visual mode, when I close the reflection window I get > prompted = > with "do you wish to save the changes to you...

Repost (sort of) of an old problem
Hi, I have been trying to find a reasonable GUI SQL client that displays results without rounding them. I was pointed to IBM's Data Studio, which we've FINALLY installed, but sadly it seems it also rounds. If I do this query from the command line: SELECT * FROM TARGET WHERE file_id = 8237 and accession_id = '200928_s_at' I get: FILE_ID ACCESSION_ID MEASURE ----------- ------------------------------ ------------------------ 8237 200928_s_at -2.78165375414833E+000 If I do the same exact thing in Data Studio I get: 8237 200929_s_at ...

Re: Odd, I do not see my posts #4
"Rick G" <Rick@dot.dot> wrote in article Rick-5BFD20.22445916092004@news.telus.net on 9/16/04 10:45 PM: > In article <cidssi$lg0@odak26.prod.google.com>, "Snit" > <CSMA_SNIT@HOTMAIL.COM> wrote: > >> "Rick G" <Rick@dot.dot> wrote in article >> Rick-8AF3C1.22280516092004@news.telus.net on 9/16/04 10:28 PM: >> >>> In article <7Au2d.2972$gG4.2712@newsread1.news.pas.earthlink.net>, >>> Not Important <NotImportant@invalid.com> wrote: >>> >>>> In article <cidps8$f3b@...

Odd 'at' bug, and mail readers
A presumptious little bug this one. I am using Solaris 7, but I observe that Solaris 9 also has it. chl% at now at> echo foobar at> <EOT> commands will be executed using /usr/bin/csh job 1070040702.a at Fri Nov 28 17:31:42 2003 This will cause mail to be sent to you, containing Your "at" job on clerew "/var/spool/cron/atjobs/1070040702.a" produced the following output: foobar Now the problem is that this mail contains the following malformed header: Content-Type: text (should have been text/plain according to RFC 2045, of course). But I never noticed ...

Sorting a ListView in Borland C++ 5.02
I've been working on some code for about a week now and I'm getting very frustrated with it. I've put together a ListView control, populated it, and now I'm trying to sort on the columns. The relevant code is as follows: // ============================================================= // Callback routine for Dialog Box showing folders and sizes // ============================================================= BOOL CALLBACK DiskUseFunc( HWND hdwnd, UINT message, WPARAM wParam, LPARAM lParam ) { switch(message) { case WM_INITDIALOG: lvHandle = GetDl...

Really odd problem, doing my head in
I have a really strange problem that I can't understand (no rude comments please :) Basically, a wimp application that uses the poll word facility is crashing for what seems like a very bizarre reason. I've constructed a minimal test case which I shall describe below: The app is a Toolbox app, with a resource file that contains only one object: an Iconbar object with both text and sprite. Adjust click is set to deliver event &82a91 (Quit_Quit) but this has no bearing on the problem. Object is shared, auto create, auto show. The program is in BASIC, it's a standard toolbox ta...