# Difference between revisions of "To Do List"

SeanParent (Talk | contribs) |
SeanParent (Talk | contribs) |
||

Line 8: | Line 8: | ||

We are working to restructure the documentation to include the "final" set of libraries and to flesh out the documentation, test cases, and in some cases, the code. | We are working to restructure the documentation to include the "final" set of libraries and to flesh out the documentation, test cases, and in some cases, the code. | ||

+ | |||

+ | ==dictionary.hpp== | ||

+ | |||

+ | * The get_value() functions are poorly named and could be generalized to work with any indexed container. | ||

+ | : consider lookup() or value_at() as more appropriate names. | ||

==Algorithms== | ==Algorithms== | ||

Line 15: | Line 20: | ||

===Non-Mutating Algorithms=== | ===Non-Mutating Algorithms=== | ||

− | Order Selection Networks - | + | * Order Selection Networks - |

− | + | ** [low priority] consider completing select.hpp to some k elements. | |

− | + | * [low priority] consider adding sorting networks (sort_2, sort_3, etc.) | |

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

− | + | ||

* [done] Removed bound_if - replaced with key_function form of lower/upper_bound. | * [done] Removed bound_if - replaced with key_function form of lower/upper_bound. | ||

Write a proper partition() (ordering and for forward iterator), partition_point_n(), and is_partitioned. | Write a proper partition() (ordering and for forward iterator), partition_point_n(), and is_partitioned. | ||

− | |||

− | |||

non_strict_order_partition(range, element, strict_weak_ordering) arranges it so that elements are not greater followed by elements which are not less. | non_strict_order_partition(range, element, strict_weak_ordering) arranges it so that elements are not greater followed by elements which are not less. | ||

Line 148: | Line 128: | ||

(notes from conversation about removing get_value() from dictionary.hpp and providing a generalized form). | (notes from conversation about removing get_value() from dictionary.hpp and providing a generalized form). | ||

− | |||

So - current summary and action items: | So - current summary and action items: | ||

− | |||

1) get_value() in dictionary.hpp becomes deprecated next release (hmm - move to a deprecated namespace?) in favor of new algorithms. | 1) get_value() in dictionary.hpp becomes deprecated next release (hmm - move to a deprecated namespace?) in favor of new algorithms. | ||

3:38 PM | 3:38 PM | ||

− | |||

2) We add: | 2) We add: | ||

I find_at(I f, I l, const T&, P); | I find_at(I f, I l, const T&, P); | ||

[along with all range variants and specialize for associative containers - P defaults to identity if value_type(I) == P) | [along with all range variants and specialize for associative containers - P defaults to identity if value_type(I) == P) | ||

− | |||

otherwise P defaults to get_element<0> (or whatever the name is in adobe/functional.hpp) | otherwise P defaults to get_element<0> (or whatever the name is in adobe/functional.hpp) | ||

− | |||

3) consider that get_element<0> should have a default implementation of identity to normalize the case. | 3) consider that get_element<0> should have a default implementation of identity to normalize the case. | ||

− | |||

4) similarly provide find_value_at() and assign_at() | 4) similarly provide find_value_at() and assign_at() | ||

Line 167: | Line 141: | ||

I assign_at(I, I, T, U&, P); | I assign_at(I, I, T, U&, P); | ||

− | |||

5) review exisiting find() algorithms to see which it would also make sense to refine for containers (i.e. find() ) | 5) review exisiting find() algorithms to see which it would also make sense to refine for containers (i.e. find() ) | ||

− | |||

− | |||

6) Add an is_associative_container<> trait so we can automatically pick up new ASL containers and can be made to work with user containers. | 6) Add an is_associative_container<> trait so we can automatically pick up new ASL containers and can be made to work with user containers. | ||

## Revision as of 01:09, 30 September 2008

## Contents

## Goals

We are now in a mode of completing the core of ASL (defined to be roughly the libraries which make of the property model and layout libraries as well as anything which is complete enough to warrant inclusion).

To that end, we are reviewing all of the libraries and for each one determining:

- Is it used and/or useful and worth being completed. If not it will either be removed all together or partitioned into the platform libraries for later consideration.
- What is necessary to complete the space to create a completed body of work.

We are working to restructure the documentation to include the "final" set of libraries and to flesh out the documentation, test cases, and in some cases, the code.

## dictionary.hpp

- The get_value() functions are poorly named and could be generalized to work with any indexed container.

- consider lookup() or value_at() as more appropriate names.

## Algorithms

- every file where we shadow the std functions should go ahead and move the std function into the adobe namespace.

### Non-Mutating Algorithms

- Order Selection Networks -
- [low priority] consider completing select.hpp to some k elements.

- [low priority] consider adding sorting networks (sort_2, sort_3, etc.)
- [done] Removed bound_if - replaced with key_function form of lower/upper_bound.

Write a proper partition() (ordering and for forward iterator), partition_point_n(), and is_partitioned.

non_strict_order_partition(range, element, strict_weak_ordering) arranges it so that elements are not greater followed by elements which are not less.

- [done] Pull count_min/max_element. Replace with two passes - max_element(), count().

Binary searches

Write a better binary_search which returns lower_bound() if exists else last.

Write an adaptor for is_in_sorted_range - set_member?

find_first_of_set() - becomes find_if with adaptor.

We should try to adapt binary search algorithms such as upper bound and lower bound to work on sets and multisets.

### Finding and Counting

- [done] rename find_not_equal to find_not.

Extending find() - also provide find_not() and count_if_not() and count_not(). exists, none, all?

Check what other adobe/STL algorithms take unary predicates (partition_not?).

Versions of find and count need to take a binary predicate - see find_match().

And find_n(), count_n() for all versions.

Versions of for_each for_each_value() - rename of for_each_position() for_each_value_n() for_each_n()

Sorting Group is_sorted sorted() rename to sorted_run()

mismatch() gets grouped with equal() and search() Add mismatch_n().

Look at reduce accumulate and related functions - do we keepr reduce_balanced()?

## Mutating Algorithms

-- copy family

Try to simply use the name copy() for copy_bound() - etc.

Add bounded forms of other functions, i.e. swap_ranges.

Also applies to find and count

copy I I 0 copy_b I I F F copy_n I n O copy_b I I O n copy_b I n F F copy_b I F F

I I n F F

--- tranform_if replaces filter by splitting the function object.

transform_if_not.

Also add _if forms for other functions.

Also have copy_if and copy_if_not (as replacement of remove). --- Explore iota and fit more into the copy notation.

With a value for increment - ---

It looks like remove_runs and mutate_runs are not used - remove them.

---

Add a reverse group and add reverse_until.

---

Remove the pair return from rotate and simply return m'

---

(notes from conversation about removing get_value() from dictionary.hpp and providing a generalized form).

So - current summary and action items: 1) get_value() in dictionary.hpp becomes deprecated next release (hmm - move to a deprecated namespace?) in favor of new algorithms. 3:38 PM 2) We add: I find_at(I f, I l, const T&, P); [along with all range variants and specialize for associative containers - P defaults to identity if value_type(I) == P) otherwise P defaults to get_element<0> (or whatever the name is in adobe/functional.hpp) 3) consider that get_element<0> should have a default implementation of identity to normalize the case. 4) similarly provide find_value_at() and assign_at()

U& find_value_at(I, I, T, P); I assign_at(I, I, T, U&, P);

5) review exisiting find() algorithms to see which it would also make sense to refine for containers (i.e. find() ) 6) Add an is_associative_container<> trait so we can automatically pick up new ASL containers and can be made to work with user containers.

## Notes

Check to see which intrinsics (like multiply returning long result) are in C99