|
| | MixinVector ()=default |
| |
| | MixinVector (std::initializer_list< T > init) |
| |
| void | append (const T &item) |
| |
| void | insert (const T &item) |
| |
| size_t | size () const noexcept |
| |
| bool | is_empty () const noexcept |
| |
| Iterator | get_it () const |
| |
| bool | operator== (const MixinVector &other) const |
| |
| bool | traverse (Operation &operation) const |
| | Traverse all elements, applying an operation to each.
|
| |
| bool | traverse (Operation &operation) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| bool | traverse (Operation and operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| bool | traverse (Operation and operation=Operation()) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| T & | nth (const size_t n) |
| | Access the n-th element (bounds-checked).
|
| |
| const T & | nth (const size_t n) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
|
| |
| T & | nth_ne (const size_t n) noexcept |
| | Access the n-th element (unchecked).
|
| |
| const T & | nth_ne (const size_t n) const noexcept |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
|
| |
| T * | find_ptr (Operation &operation) |
| | Find the first element satisfying a predicate.
|
| |
| const T * | find_ptr (Operation &operation) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| const T * | find_ptr (Operation and operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| T * | find_ptr (Operation and operation=Operation()) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| std::tuple< bool, T > | find_item (Operation &operation) |
| | Find element with success flag.
|
| |
| std::tuple< bool, T > | find_item (Operation &operation) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| std::tuple< bool, T > | find_item (Operation &&operation=Operation()) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| std::tuple< bool, T > | find_item (Operation &&operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| auto | for_each (Operation &operation) const -> decltype(self()) |
| | Apply an operation to each element (read-only).
|
| |
| auto | for_each (Operation &operation) -> decltype(self()) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| auto | for_each (Operation &&operation=Operation()) const -> decltype(self()) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| auto | for_each (Operation &&operation=Operation()) -> decltype(self()) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| auto | mutable_for_each (Operation &operation) -> decltype(self()) |
| | Apply an operation to each element (mutable).
|
| |
| auto | mutable_for_each (Operation &&operation=Operation()) -> decltype(self()) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| bool | all (Operation &operation) const |
| | Test if all elements satisfy a predicate.
|
| |
| bool | all (Operation &&operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| bool | forall (Operation &operation) const |
| | Alias for all().
|
| |
| bool | forall (Operation &&operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| bool | exists (Operation &operation) const |
| | Test if any element satisfies a predicate.
|
| |
| bool | exists (Operation &&operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| Container< concepts_detail::map_result_t< R, Operation &, T > > | maps (Operation &operation) const |
| |
| Container< concepts_detail::map_result_t< R, Operation &, T > > | maps (Operation &&operation=Operation()) const |
| |
| Acc | foldl (const Acc &init, std::function< Acc(const Acc &, const T &)> operation) const |
| | Left fold (reduce) with initial value.
|
| |
| Acc | fold_left (std::function< Acc(const Acc &, const T &)> operation, const Acc &init) const |
| | Left fold with operation first (alternative signature).
|
| |
| T | fold (const T &init, Operation &operation) const |
| | Simple fold with same type for accumulator and elements.
|
| |
| T | fold (const T &init, Operation &&operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| DynList< T > | filter (Operation &operation) const |
| | Filter elements by a predicate.
|
| |
| DynList< T > | filter (Operation &&operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| DynList< std::tuple< T, size_t > > | pfilter (Operation &operation) const |
| | Filter with position information.
|
| |
| DynList< std::tuple< T, size_t > > | pfilter (Operation &&operation=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| std::pair< DynList< T >, DynList< T > > | partition (Operation &op) const |
| | Partition elements by a predicate.
|
| |
| std::pair< DynList< T >, DynList< T > > | partition (Operation &&op=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| std::tuple< DynList< T >, DynList< T > > | tpartition (Operation &op) const |
| | Partition returning tuple instead of pair.
|
| |
| std::tuple< DynList< T >, DynList< T > > | tpartition (Operation &&op=Operation()) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| size_t | length () const noexcept |
| | Count the number of elements.
|
| |
| Container< T > | rev () const |
| | Create a reversed copy.
|
| |
| Container< T > | take (const size_t n) const |
| | Take the first n elements.
|
| |
| Container< T > | drop (const size_t n) const |
| | Skip the first n elements.
|
| |
| T | sum (const T &init=T {}) const |
| | Compute the sum of all elements.
|
| |
| T | product (const T &init) const |
| | Compute the product of all elements.
|
| |
| const T * | min () const |
| | Find the minimum element.
|
| |
| const T * | max () const |
| | Find the maximum element.
|
| |
| const T * | min_by (Compare cmp) const |
| | Find the minimum element using a custom comparator.
|
| |
| const T * | max_by (Compare cmp) const |
| | Find the maximum element using a custom comparator.
|
| |
| bool | has_value (const T &val) const |
| | Check if container has a value.
|
| |
| bool | none (Predicate &pred) const |
| | Check if no element satisfies a predicate.
|
| |
| bool | none (Predicate &&pred) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
| |
| size_t | count_if (Predicate pred) const |
| | Count elements satisfying a predicate.
|
| |
| const T * | first () const |
| | Get the first element.
|
| |
| T | first_or (const T &default_val) const |
| | Get the first element or a default value.
|
| |
| const T * | last () const |
| | Get the last element.
|
| |
| T | last_or (const T &default_val) const |
| | Get the last element or a default value.
|
| |
| Container< std::pair< size_t, T > > | enumerate () const |
| | Enumerate elements with their indices.
|
| |
| size_t | find_index (Predicate pred) const |
| | Find the index of the first element satisfying a predicate.
|
| |
| size_t | index_of (const T &val) const |
| | Find the index of a specific value.
|
| |
| Container< T > | unique () const |
| | Remove consecutive duplicate elements.
|
| |
| Container< T > | unique_by (EqPred eq) const |
| | Remove consecutive duplicates using a custom equality predicate.
|
| |
| Container< T > | intersperse (const T &sep) const |
| | Intersperse a separator between elements.
|
| |
| Container< Container< T > > | chunk (size_t n) const |
| | Split into chunks of fixed size.
|
| |
| Container< Container< T > > | sliding (size_t size, size_t step=1) const |
| | Create sliding windows of fixed size.
|
| |
| std::vector< T > | to_vector () const |
| | Convert to std::vector.
|
| |
| DynListType | to_dynlist () const |
| | Convert container to DynList.
|
| |
| StringType | join (const StringType &sep=StringType{", "}) const |
| | Join elements into a string with separator.
|
| |
| std::string | join_str (const std::string &sep=", ") const |
| | Join string elements with separator.
|
| |
| Container< std::pair< T, typename Other::Item_Type > > | zip_with (const Other &other) const |
| | Zip with another container.
|
| |
| Container< T > | keys () const |
| | Extract all keys as a list.
|
| |
| Container< T > | items () const |
| | Alias for keys().
|
| |