# Differences

This shows you the differences between two versions of the page.

ada.containers.vectors [2012/01/24 08:04] thomaslocke [Vectors.To_Index] |
ada.containers.vectors [2012/01/24 08:10] (current) thomaslocke [Equality] |
||
---|---|---|---|

Line 2359: | Line 2359: | ||

And there you have it: A perfectly sorted //quotes.txt// file. It just doesn't get any simpler than that. | And there you have it: A perfectly sorted //quotes.txt// file. It just doesn't get any simpler than that. | ||

- | [[Vectors.Generic_Sorting.Sort|Example Source]] | + | [[Vectors.Generic_Sorting.Sort|Vectors.Generic_Sorting.Sort Example Source]] |

==== Generic_Sorting.Is_Sorted ==== | ==== Generic_Sorting.Is_Sorted ==== | ||

Line 2410: | Line 2410: | ||

In case of large vectors, this is not very efficient. Given that, you should of course only use //Is_Sorted// if it's absolutely necessary. | In case of large vectors, this is not very efficient. Given that, you should of course only use //Is_Sorted// if it's absolutely necessary. | ||

- | [[Vectors.Generic_Sorting.Is_Sorted|Example Source]] | + | [[Vectors.Generic_Sorting.Is_Sorted|Vectors.Generic_Sorting.Is_Sorted Example Source]] |

==== Generic_Sorting.Merge ==== | ==== Generic_Sorting.Merge ==== | ||

Line 2484: | Line 2484: | ||

When using //Merge// it is very important to remember this: Both the //Target// and //Source// vectors **must** be sorted prior to the //Merge// call, else you'll end up with an un-sorted vector as the result. (If that is all you want, then it's probably faster to use one of the following procedures: [[Ada.Containers.Vectors#Vectors.Append | Append]], [[Ada.Containers.Vectors#Vectors.Insert | Insert]], [[Ada.Containers.Vectors#Vectors.Prepend | Prepend]]. Or you could simply use the //&// function to get the job done.) | When using //Merge// it is very important to remember this: Both the //Target// and //Source// vectors **must** be sorted prior to the //Merge// call, else you'll end up with an un-sorted vector as the result. (If that is all you want, then it's probably faster to use one of the following procedures: [[Ada.Containers.Vectors#Vectors.Append | Append]], [[Ada.Containers.Vectors#Vectors.Insert | Insert]], [[Ada.Containers.Vectors#Vectors.Prepend | Prepend]]. Or you could simply use the //&// function to get the job done.) | ||

- | [[Vectors.Generic_Sorting.Merge|Example Source]] | + | [[Vectors.Generic_Sorting.Merge|Vectors.Generic_Sorting.Merge Example Source]] |

===== Concatenate using the & operator ===== | ===== Concatenate using the & operator ===== | ||

Line 2632: | Line 2632: | ||

If you care about performance, it is probably best to avoid using the "&" functions. As the simple benchmark shows, there are faster ways to concatenate vectors and/or vector elements than using "&". | If you care about performance, it is probably best to avoid using the "&" functions. As the simple benchmark shows, there are faster ways to concatenate vectors and/or vector elements than using "&". | ||

- | [[The|& operator Example Source]] | + | [[The & operator Example Source|The & operator Example Source]] |

===== Equality ===== | ===== Equality ===== | ||

Line 2669: | Line 2669: | ||

This is of course as expected. | This is of course as expected. | ||

- | [[Equality|Example Source]] | + | [[Equality|Equality Example Source]] |