473,387 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Standard

How map e std::sort() is implemented in the standard???

--
Kleidemos
C++ Programmer
kl**************@altervista.org
http://kleidemos.altervista.org/
Jul 22 '05 #1
2 1168
Kleidemos wrote:
How map e std::sort() is implemented in the standard???

Italian:
Hai gia' avuto la risposta su it.comp.lang.c++ :-)

English:
AFAIK, C++ standard doesn't mandate a specific implementation for std
containers and algorithms, it only specifies the computational
complexity involved in operations.
If you want to know how the specific implementation of standard library
you are using is done, please check your library documentation or ask to
its specific NG or mailing list, if any, or directly to its producer.

--
Roal Zanazzi

Jul 22 '05 #2
Kleidemos wrote:
How map e std::sort() is implemented in the standard???


Except from "http://www.sgi.com/tech/stl/complexity.html":

STL Complexity Specifications

STL container, algorithm, and concept specifications include asymptotic
complexity specifications. For example, iterators are required to take
constant time, that is the time required by an iterator operation should be
no more than a fixed constant, independent of the size of the container to
which it refers.

Clearly programs will still function if a program component ignores the
complexity specifications. Nonetheless, these specifications are an
important part of the interface between STL components and code that uses
them. If they are ignored, the performance of the resulting program will
often render it useless.

[...]

Concept specifications (e.g. Forward Iterator or Container) specify
complexity requirements that should be met by all instances of the concept.
This is the minimum behavior required by operations (e.g. sort)
parameterized with respect to the concept. Any specific instance (e.g.
vector) is likely to perform better in at least some cases.

[...]

Algorithms specify either worst-case or average case performance, and
identify which. Unless otherwise stated, averages assume that container
elements are chosen from a finite type with more possible values than the
size of the container, and that container elements are independently
uniformly distributed.

[...]

Bye!

--
---
*************** | Have you ever retired a human by mystake?
*** Azathot *** |
*************** | To contact me, ask me gently. Thanks.
Jul 22 '05 #3

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

Similar topics

25
by: Magnus Lie Hetland | last post by:
Is there any interest in a (hypothetical) standard graph API (with 'graph' meaning a network, consisting of nodes and edges)? Yes, we have the standard ways of implementing graphs through (e.g.)...
6
by: John Bentley | last post by:
John Bentley writes at this level: If we think about our savings accounts then division never comes in (as far as I can see). We deposit and withdraw exact amounts most of the time. Occasionaly...
29
by: David Eng | last post by:
In replying to P.J. Plauger (...
43
by: Steven T. Hatton | last post by:
Now that I have a better grasp of the scope and capabilities of the C++ Standard Library, I understand that products such as Qt actually provide much of the same functionality through their own...
52
by: lovecreatesbeauty | last post by:
Why the C standard committee doesn't provide a standard implementation including the C compiler and library when the language standard document is published? C works on the abstract model of low...
24
by: noridotjabi | last post by:
Why isn't there a Graphical User Interface standard? Think about it for a second. You may say, well evey systems API for GUIs is differnt, but do take into acound: every operating system requires...
132
by: Frederick Gotham | last post by:
If we look at a programming language such as C++: When an updated Standard comes out, everyone adopts it and abandons the previous one. It seems though that things aren't so clear-cut in the C...
1
by: manish deshpande | last post by:
Hi, When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command: rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown: ...
26
by: Rick | last post by:
I'm told that "#pragma once" has made it into the ISO standard for either C or C++. I can't find any reference to that anywhere. If it's true, do any of you have a reference I can use? ...
270
by: jacob navia | last post by:
In my "Happy Christmas" message, I proposed a function to read a file into a RAM buffer and return that buffer or NULL if the file doesn't exist or some other error is found. It is interesting...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.