Y
Yin Zhu
Hello all,
I haved used STL in writing some arithmetic programs for a while now.
There are some very convenient to use, such as
map(use it as a mapping array), set(use it as a dictionary for Insert,
Delete, Exist query ..), vector(a varying length array, O(1) push under
amortization)
but STL didn't support other function , such as
*)findKth in set, althought rb-tree can easily be augmented to support
this
function.
*)sort strings(we often use a radix sort method or ternary searching
tree to
do the string sorting efficently)
now My question comes to
1) Does STL encourge people to augment them? (it seems to me that STL
codes
are so integrated that modifying it will be more difficult to write a
new one)
2) Or STL is just a set of solid examples to show how you write your
own library
from scratch.
thanks in advance.
I haved used STL in writing some arithmetic programs for a while now.
There are some very convenient to use, such as
map(use it as a mapping array), set(use it as a dictionary for Insert,
Delete, Exist query ..), vector(a varying length array, O(1) push under
amortization)
but STL didn't support other function , such as
*)findKth in set, althought rb-tree can easily be augmented to support
this
function.
*)sort strings(we often use a radix sort method or ternary searching
tree to
do the string sorting efficently)
now My question comes to
1) Does STL encourge people to augment them? (it seems to me that STL
codes
are so integrated that modifying it will be more difficult to write a
new one)
2) Or STL is just a set of solid examples to show how you write your
own library
from scratch.
thanks in advance.