|
-
May 2nd, 2003, 12:29 PM
#1
Time consumed_
If I use vector class's functions to search my data, could you tell
me how I will know how fast its predefined algorithms will be. In order to be more precise about what I mean, if we, for instance, write a certain kind of algorithm to perform the searching task, we can compute the time taken for its performance, something like T(n^2) or T(nlogn),etc, but if it is already defined functions, how can we compute it ?
Thank you very much...
Regards,
Nina.
-
May 2nd, 2003, 12:33 PM
#2
Re: Time consumed_
Originally posted by hometown
If I use vector class's functions to search my data, could you tell
me how I will know how fast its predefined algorithms will be. In order to be more precise about what I mean, if we, for instance, write a certain kind of algorithm to perform the searching task, we can compute the time taken for its performance, something like T(n^2) or T(nlogn),etc, but if it is already defined functions, how can we compute it ?
Thank you very much...
Regards,
Nina.
The search time for a vector is (and must be) linear -- O(n).
Regards,
Paul McKenzie
-
May 2nd, 2003, 01:22 PM
#3
Thank you Sir very much...
-
May 2nd, 2003, 02:00 PM
#4
I just want to add that a good reference source will allow you to
look up this information yourself. One such source is "The C++
Standard Library" by Nicolai M Josuttis.
-
May 2nd, 2003, 02:15 PM
#5
Thank you Sir very much...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|