473,659 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stable sort?

I need a sort method for stable sorting, that is, if two values have the
same value they won't be swapped. Will there be such a thing in whidbey?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 16 '05 #1
2 3815
Array.Sort is one function available in .NET for sorting. Unfortunately its
unstable sort. There is no direct class for stable sort algorithm

You can try implementing MergeSort algorithm(stabl e sort) converting c++
code to c#.

--
Shak
(Houston)
"cody" <pl************ *************@g mx.de> wrote in message
news:ej******** *****@TK2MSFTNG P09.phx.gbl...
I need a sort method for stable sorting, that is, if two values have the
same value they won't be swapped. Will there be such a thing in whidbey?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk

Nov 16 '05 #2
bob
If you call the sort method twice each time it seems to be stable
"Shakir Hussain" <sh**@fakedomai n.com> wrote in message news:<ug******* *******@TK2MSFT NGP11.phx.gbl>. ..
Array.Sort is one function available in .NET for sorting. Unfortunately its
unstable sort. There is no direct class for stable sort algorithm

You can try implementing MergeSort algorithm(stabl e sort) converting c++
code to c#.

--
Shak
(Houston)
"cody" <pl************ *************@g mx.de> wrote in message
news:ej******** *****@TK2MSFTNG P09.phx.gbl...
I need a sort method for stable sorting, that is, if two values have the
same value they won't be swapped. Will there be such a thing in whidbey?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1587
by: Jon Speer | last post by:
Apologies in advance if this topic has been covered. We have found that stable sort blows up when called with a single element (i.e. RandomAccessIterator beg = RandomAccessIterator end). Is this commonly known and we're just behind the curve? Is there any kind of fix available other than checking for list size = 1 before every call (it's a large project)? Any ideas/suggestions are appreciated. J. Speer
38
5773
by: Aaron W. LaFramboise | last post by:
Hello, I understand that an easy way to make the standard std::priority_queue stable is by including an integer stamp with each node that is incremented each time a new node is pushed into the queue. However, no matter what reasonably-sized type I use for the stamp, eventually the stamp will 'wrap around' and possibly cause incorrect ordering of elements. For my application, which queues elements very quickly and runs for an...
0
1392
by: grman2005 | last post by:
I am trying to prove with writing code in a megre sort alogorithm code in order to show that is stable but I cannot manage. Have you any idea how this is impmented? I know that I have to check for the same values but i donot know where in code of the mergesort. Can i keep the pointer of the unsorted list ? thanks
30
2728
by: gaoxtwarrior | last post by:
a sort which is stable means it keeps the object's original order. A sort which is in place is stable. does anyone can explain me what is sort in place? thx.
9
4509
by: Gary Brown | last post by:
Hi, I need a stable sort and can find none in the MS libraries. Is there a simple one available on the internet? It needed for sorting various lists of maybe 1K elements - mostly ListView columns. I took an algorithms course many years ago and learned to really hate writing sort routines or I would just write one.
1
3979
by: manjusha27 | last post by:
Hi, Could somebody suggest an application for the stable sorting technique? Any scenario where you've chosen a particular sorting algorithm because it is stable? Thanks.
0
8330
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.