10#define __XTD_STD_INTERNAL__
12#undef __XTD_STD_INTERNAL__
13#define __XTD_CORE_INTERNAL__
17#undef __XTD_CORE_INTERNAL__
41template<
typename type_t>
42struct __opaque_xtd_linq_enumerable_collection__;
43template<
typename type_t,
typename param_t>
44struct __opaque_xtd_linq_lazy_enumerable__;
52 template<
typename type_t>
54 template<
typename type_t>
83 template<
typename type_t>
87 template<
typename type_t>
91 template<
typename type_t>
95 template<
typename type_t>
99 template<
typename key_t,
typename value_t>
114 template<xtd::iterable source_t, xtd::func_callable<xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> func_t>
126 template<xtd::iterable source_t, xtd::func_callable<xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> func_t>
140 template<xtd::iterable source_t, xtd::func_callable<xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> func_t>
151 template<xtd::iterable source_t, xtd::predicate_callable<xtd::iterable_value_type<source_t>> predicate_t>
152 [[nodiscard]]
static auto all(source_t&& source, predicate_t&&
predicate) -> bool;
162 template<xtd::iterable source_t>
163 [[nodiscard]]
static auto any(source_t&& source)
noexcept -> bool;
172 template<xtd::iterable source_t, xtd::predicate_callable<xtd::iterable_value_type<source_t>> predicate_t>
173 [[nodiscard]]
static auto any(source_t&& source, predicate_t&&
predicate) -> bool;
183 template<xtd::iterable source_t>
194 template<xtd::iterable source_t>
203 template<xtd::iterable source_t>
212 template<xtd::iterable source_t>
221 template<
typename value_t>
231 template<std::forward_iterator iterator_t>
241 template<std::forward_iterator iterator_t>
251 template<
typename value_t, xtd::usize length>
261 template<
typename value_t, xtd::usize length>
265 template<xtd::usize size_>
267 template<xtd::usize size_>
269 template<
typename value_t,
typename container_t>
271 template<
typename value_t,
typename container_t>
273 template<
typename value_t,
typename container_t>
275 template<
typename value_t,
typename container_t>
277 template<
typename value_t,
typename container_t>
279 template<
typename value_t,
typename container_t>
287 template<xtd::iterable source_t>
294 template<xtd::iterable source_t>
296 [[nodiscard]]
static auto average(source_t&& source) -> double;
301 template<xtd::iterable source_t>
308 template<xtd::iterable source_t>
310 [[nodiscard]]
static auto average(source_t&& source) -> double;
315 template<xtd::iterable source_t>
317 [[nodiscard]]
static auto average(source_t&& source) -> double;
322 template<xtd::iterable source_t>
328 template<xtd::iterable source_t>
334 template<xtd::iterable source_t>
340 template<xtd::iterable source_t>
346 template<xtd::iterable source_t>
357 template<
typename result_t, xtd::iterable source_t>
367 template<xtd::iterable source_t>
375 template<xtd::iterable first_t, xtd::iterable second_t>
383 template<xtd::iterable source_t>
391 template<xtd::iterable source_t>
399 template<xtd::iterable source_t, xtd::func_callable<
bool, xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> equater_t>
409 template<xtd::iterable source_t>
419 template<xtd::iterable source_t, xtd::predicate_callable<xtd::iterable_value_type<source_t>> predicate_t>
426 template<xtd::iterable source_t>
438 template<
typename key_t, xtd::iterable source_t, xtd::callable<key_t, xtd::iterable_value_type<source_t>> key_selector_t>
450 template<
typename key_t, xtd::iterable source_t, xtd::callable<key_t, xtd::iterable_value_type<source_t>> key_selector_t>
463 template<
typename key_t, xtd::iterable source_t, xtd::callable<key_t, xtd::iterable_value_type<source_t>> key_selector_t, xtd::func_callable<
bool, key_t, key_t> key_equater_t>
473 template<xtd::iterable source_t>
483 template<xtd::iterable source_t>
490 template<xtd::iterable source_t>
496 template<xtd::iterable source_t>
503 template<xtd::iterable source_t, xtd::func_callable<
bool, xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> equater_t>
511 template<xtd::iterable source_t>
519 template<xtd::iterable source_t, xtd::func_callable<
bool, xtd::iterable_value_type<source_t>> predicate_t>
528 template<xtd::iterable source_t, xtd::predicate_callable<xtd::iterable_value_type<source_t>> prediacte_t>
535 template<xtd::iterable source_t, xtd::predicate_callable<xtd::iterable_value_type<source_t>> prediacte_t>
542 template<xtd::iterable source_t>
548 template<xtd::iterable source_t>
560 template<xtd::iterable source_t>
561 [[nodiscard]]
static auto from(source_t&& source)
noexcept;
570 template<xtd::iterable source_t>
580 template<xtd::iterable source_t>
590 template<
typename value_t>
603 template<std::forward_iterator iterator_t>
614 template<std::forward_iterator iterator_t>
625 template<
typename value_t, xtd::usize length>
636 template<
typename value_t, xtd::usize length>
640 template<xtd::usize size_>
642 template<xtd::usize size_>
644 template<
typename value_t,
typename container_t>
646 template<
typename value_t,
typename container_t>
648 template<
typename value_t,
typename container_t>
650 template<
typename value_t,
typename container_t>
652 template<
typename value_t,
typename container_t>
654 template<
typename value_t,
typename container_t>
663 template<xtd::iterable source_t>
671 template<xtd::iterable source_t, xtd::func_callable<
bool, xtd::iterable_value_type<source_t>> predicate_t>
677 template<xtd::iterable source_t>
684 template<xtd::iterable source_t, xtd::callable<xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> selector_t>
691 template<
typename result_t, xtd::iterable source_t, xtd::callable<result_t, xtd::iterable_value_type<source_t>> selector_t>
693 [[nodiscard]]
static auto max(source_t&& source, selector_t&& selector) -> result_t;
698 template<xtd::iterable source_t>
705 template<xtd::iterable source_t, xtd::callable<xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> selector_t>
712 template<
typename result_t, xtd::iterable source_t, xtd::callable<result_t, xtd::iterable_value_type<source_t>> selector_t>
714 [[nodiscard]]
static auto min(source_t&& source, selector_t&& selector) -> result_t;
719 template<xtd::iterable source_t>
725 template<xtd::iterable source_t>
732 template<xtd::iterable source_t, xtd::func_callable<
bool, xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> lesser_t>
742 template<
typename key_t, xtd::iterable source_t, xtd::callable<key_t, xtd::iterable_value_type<source_t>> key_selector_t>
752 template<xtd::iterable source_t, xtd::callable<xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> key_selector_t>
762 template<
typename key_t, xtd::iterable source_t, xtd::callable<key_t, xtd::iterable_value_type<source_t>> key_selector_t>
772 template<xtd::iterable source_t, xtd::callable<xtd::iterable_value_type<source_t>, xtd::iterable_value_type<source_t>> key_selector_t>
782 template<xtd::
integer
integer_t>
792 template<xtd::
integer
integer_t>
800 template<xtd::
integer
integer_t>
810 template<
typename element_t>
825 template<xtd::iterable source_t>
837 template<xtd::iterable source_t>
849 template<xtd::iterable source_t>
850 [[nodiscard]] static auto select(source_t&& source, auto&& selector) -> xtd::collections::generic::enumerable_generator<xtd::raw_type<decltype(selector(std::declval<const xtd::iterable_value_type<source_t>&>(), xtd::usize {}))>>;
857 template<xtd::iterable first_t, xtd::iterable second_t>
864 template<xtd::iterable first_t, xtd::iterable second_t>
871 template<xtd::iterable first_t, xtd::iterable second_t, xtd::func_callable<
bool, xtd::iterable_value_type<first_t>, xtd::iterable_value_type<second_t>> equality_comparer_t>
872 [[nodiscard]]
static auto sequence_equal(first_t&&
first, second_t&& second, equality_comparer_t&& comparer) -> bool;
878 template<xtd::forward_iterable source_t>
885 template<xtd::iterable source_t>
895 template<xtd::iterable source_t>
902 template<xtd::iterable source_t>
909 template<xtd::iterable source_t>
919 template<xtd::iterable source_t>
931 template<
typename source_t>
943 template<
typename source_t>
957 template<xtd::iterable source_t>
967 template<xtd::iterable first_t, xtd::iterable second_t>
977 template<xtd::iterable first_t, xtd::iterable second_t>
984 template<xtd::iterable first_t, xtd::iterable second_t, xtd::iterable third_t>
992 template<xtd::iterable first_t, xtd::iterable second_t, xtd::iterable third_t>
997 template<
typename type_t>
998 struct enumerable_holder {
999 enumerable_holder(
const type_t& value);
1001 enumerable_holder(type_t&& value)
requires std::movable<type_t>;
1006 std::optional<type_t> value_;
1010 template<
typename...>
1011 static inline constexpr bool always_false_v =
false;
1013 template<
typename predicate_t,
typename value_t>
1014 [[nodiscard]]
static constexpr auto invoke_predicate_with_optional_index(predicate_t&&
predicate, value_t&& value,
xtd::usize index) -> bool;
1016 template<
typename result_t,
typename selector_t,
typename value_t>
1017 [[nodiscard]]
static auto invoke_selector_with_optional_index(selector_t&& selector, value_t&& value,
xtd::usize index) -> result_t;
Contains xtd::callable concept.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents an enumerable generator that supports deferred, lazy iteration over a collection of a spec...
Definition enumerable_generator.hpp:45
Exposes a method that compares two objects.
Definition icomparer.hpp:30
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:46
Defines methods to support the comparison of objects for equality.
Definition iequality_comparer.hpp:34
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:84
Provides a set of static methods for querying objects that implement ienumerable <type_t>.
Definition enumerable_.hpp:77
static auto chunk(source_t &&source, xtd::usize size) -> xtd::collections::generic::enumerable_generator< xtd::array< xtd::iterable_value_type< source_t > > >
Splits the elements of a sequence into chunks of size at most size.
static auto order_by_descending(source_t &&source, key_selector_t &&key_selector) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Sorts the elements of a sequence in descending order according to a key.
static auto zip(first_t &&first, second_t &&second, third_t &&third, auto &&result_selector) -> xtd::collections::generic::enumerable_generator< xtd::raw_type< decltype(result_selector(std::declval< const xtd::iterable_value_type< first_t > & >(), std::declval< const xtd::iterable_value_type< second_t > & >(), std::declval< const xtd::iterable_value_type< third_t > & >()))> >
Applies a specified function to the corresponding elements of three sequences, producing a sequence o...
static auto last(source_t &&source) -> xtd::iterable_value_type< source_t >
Returns the last element of a sequence.
static auto order(source_t &&source, lesser_t &&lesser) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Sorts the elements of a sequence in ascending order.
static auto range(integer_t start, integer_t count) -> xtd::collections::generic::enumerable_generator< integer_t >
Generates a sequence of integral numbers within a specified range.
static auto sequence_equal(first_t &&first, second_t &&second) -> bool
Determines whether two sequences are equal by comparing the elements by using the default equality co...
static auto zip(first_t &&first, second_t &&second) -> xtd::collections::generic::enumerable_generator< std::tuple< xtd::iterable_value_type< first_t >, xtd::iterable_value_type< second_t > > >
Produces a sequence of tuples with elements from the two specified sequences.
static auto order_by(source_t &&source, key_selector_t &&key_selector) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Sorts the elements of a sequence in ascending order according to a key.
static auto last(source_t &&source, predicate_t &&predicate) -> xtd::iterable_value_type< source_t >
Returns the last element in a sequence that satisfies a specified condition.
static auto skip_while(source_t &&source, auto &&predicate) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Bypasses elements in a sequence as long as a specified condition is true and then returns the remaini...
static auto order_by_descending(source_t &&source, key_selector_t &&key_selector) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Sorts the elements of a sequence in descending order according to a key.
static auto max(source_t &&source, selector_t &&selector) -> xtd::iterable_value_type< source_t >
Returns the maximum value in a sequence of xtd::numeric values.
typename xtd::collections::generic::ienumerable< type_t > ienumerable
Represents the ienumerable value type.
Definition enumerable_.hpp:92
typename xtd::collections::generic::enumerator< type_t > enumerator
Represents the enumerator value type.
Definition enumerable_.hpp:84
static auto sequence_equal(first_t &&first, second_t &&second, const iequality_comparer< xtd::iterable_value_type< first_t > > &comparer) -> bool
Determines whether two sequences are equal by comparing their elements by using a specifie the equali...
static auto distinct(source_t &&source) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns distinct elements from a sequence by using the default equality comparer to compare values.
static auto from(std::initializer_list< value_t > source) noexcept -> xtd::collections::generic::enumerable_generator< value_t >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto concat(first_t &&first, second_t &&second) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< first_t > >
Concatenates two sequences.
static auto first_or_default(source_t &&source, prediacte_t &&predicate, xtd::iterable_value_type< source_t > &&default_value) noexcept -> xtd::iterable_value_type< source_t >
Returns the first element of the sequence that satisfies a condition, or a specified default value if...
typename xtd::collections::generic::iequality_comparer< type_t > iequality_comparer
Represents the ienumerable value type.
Definition enumerable_.hpp:88
static auto aggregate(source_t &&source, xtd::iterable_value_type< source_t > &&seed, func_t &&func, auto &&result_selector) -> xtd::raw_type< decltype(result_selector(std::declval< const xtd::iterable_value_type< source_t > & >()))>
Applies an accumulator function over a sequence. The specified seed value is used as the initial accu...
static auto zip(first_t &&first, second_t &&second, third_t &&third) -> xtd::collections::generic::enumerable_generator< std::tuple< xtd::iterable_value_type< first_t >, xtd::iterable_value_type< second_t >, xtd::iterable_value_type< third_t > > >
Produces a sequence of tuples with elements from the three specified sequences.
static auto min(source_t &&source) -> xtd::iterable_value_type< source_t >
Returns the minimum value in a sequence of xtd::numeric values.
static auto count_by(source_t &&source, key_selector_t &&key_selector, const iequality_comparer< key_t > &key_comparer) noexcept -> xtd::collections::generic::enumerable_generator< xtd::collections::generic::key_value_pair< key_t, xtd::usize > >
Returns the count of elements in the source sequence grouped by key.
static auto as_enumerable(iterator_t first, iterator_t last) noexcept -> xtd::collections::generic::enumerable_generator< typename std::decay< decltype(*first)>::type >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
typename xtd::collections::generic::list< type_t > list
Represents the list value type.
Definition enumerable_.hpp:96
static auto as_enumerable(value_t(&array)[length]) noexcept -> xtd::collections::generic::enumerable_generator< value_t >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto default_if_empty(source_t &&source) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns the elements of the specified sequence or the type parameter's default value in a singleton c...
static auto contains(source_t &&source, const xtd::iterable_value_type< source_t > &value) noexcept -> bool
Determines whether a sequence contains a specified element by using the default equality comparer.
static auto as_enumerable(const value_t(&array)[length]) noexcept -> xtd::collections::generic::enumerable_generator< value_t >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto first(source_t &&source, predicate_t &&predicate) -> xtd::iterable_value_type< source_t >
Returns the first element in a sequence that satisfies a specified condition.
static auto take(source_t &&source, xtd::usize count) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns a specified number of contiguous elements from the start of a sequence.
static auto average(source_t &&source) -> double
Computes the average of a sequence of xtd::int64 values.
static auto average(source_t &&source) -> xtd::optional< double >
Computes the average of a sequence of optional xtd::int64 values.
static auto as_enumerable(const source_t &source) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto average(source_t &&source) -> xtd::optional< double >
Computes the average of a sequence of optional double values.
static auto count_by(source_t &&source, key_selector_t &&key_selector) noexcept -> xtd::collections::generic::enumerable_generator< xtd::collections::generic::key_value_pair< key_t, xtd::usize > >
Returns the count of elements in the source sequence grouped by key.
static auto first_or_default(source_t &&source, xtd::iterable_value_type< source_t > &&default_value) noexcept -> xtd::iterable_value_type< source_t >
Returns the first element of the sequence that satisfies a condition or a default value if no such el...
static auto from(iterator_t iterator, xtd::usize length) noexcept -> xtd::collections::generic::enumerable_generator< typename std::decay< decltype(*iterator)>::type >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto all(source_t &&source, predicate_t &&predicate) -> bool
Determines whether all elements of a sequence satisfy a condition.
static auto average(source_t &&source) -> xtd::optional< xtd::decimal >
Computes the average of a sequence of optional xtd::decimal values.
static auto as_enumerable(iterator_t iterator, xtd::usize length) noexcept -> xtd::collections::generic::enumerable_generator< typename std::decay< decltype(*iterator)>::type >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto zip(first_t &&first, second_t &&second, auto &&result_selector) -> xtd::collections::generic::enumerable_generator< xtd::raw_type< decltype(result_selector(std::declval< const xtd::iterable_value_type< first_t > & >(), std::declval< const xtd::iterable_value_type< second_t > & >()))> >
Applies a specified function to the corresponding elements of two sequences, producing a sequence of ...
static auto distinct(source_t &&source, equater_t &&equater) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_c...
static auto average(source_t &&source) -> xtd::optional< xtd::single >
Computes the average of a sequence of optional float values.
static auto order(source_t &&source, const xtd::collections::generic::icomparer< xtd::iterable_value_type< source_t > > &comparer) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Sorts the elements of a sequence in ascending order.
static auto from(source_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto max(source_t &&source, selector_t &&selector) -> result_t
Returns the maximum value in a sequence of xtd::numeric values.
static auto shuffle(source_t &&source) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Shuffles the order of the elements of a sequence.
Definition random.hpp:277
static auto contains(source_t &&source, const xtd::iterable_value_type< source_t > &value, equater_t &&equater) noexcept -> bool
Determines whether a sequence contains a specified element by using a specified equality comparer.
static auto order(source_t &&source) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Sorts the elements of a sequence in ascending order.
static auto cast(source_t &&source) -> xtd::collections::generic::enumerable_generator< result_t >
Casts the elements of an xtd::collections::generic::ienumerable to the specified type.
static auto where(source_t &&source, auto &&predicate) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Filters a sequence of values based on a predicate.
static auto aggregate(source_t &&source, func_t &&func) -> xtd::iterable_value_type< source_t >
Applies an accumulator function over a sequence.
static auto first_or_default(source_t &&source, prediacte_t &&predicate) noexcept -> xtd::iterable_value_type< source_t >
Returns the first element of the sequence that satisfies a condition or a default value if no such el...
static auto from(iterator_t first, iterator_t last) noexcept -> xtd::collections::generic::enumerable_generator< typename std::decay< decltype(*first)>::type >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto as_enumerable(source_t &&source) noexcept
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto average(source_t &&source) -> xtd::decimal
Computes the average of a sequence of xtd::decimal values.
static auto distinct(source_t &&source, const iequality_comparer< xtd::iterable_value_type< source_t > > &comparer) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns distinct elements from a sequence by using a specified xtd::collections::generic::iequality_c...
static auto as_enumerable(source_t &source) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto any(source_t &&source, predicate_t &&predicate) -> bool
Determines whether any element of a sequence satisfies a condition.
static auto from(const value_t(&array)[length]) noexcept -> xtd::collections::generic::enumerable_generator< value_t >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto min(source_t &&source, selector_t &&selector) -> xtd::iterable_value_type< source_t >
Returns the minimum value in a sequence of xtd::numeric values.
static auto from(value_t(&array)[length]) noexcept -> xtd::collections::generic::enumerable_generator< value_t >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto select(source_t &&source, auto &&selector) -> xtd::collections::generic::enumerable_generator< xtd::raw_type< decltype(selector(std::declval< const xtd::iterable_value_type< source_t > & >()))> >
Projects each element of a sequence into a new form.
static auto count(source_t &&source, predicate_t &&predicate) noexcept -> xtd::usize
Returns a number that represents how many elements in the specified sequence satisfy a condition.
static auto from(const source_t &source) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto contains(source_t &&source, const xtd::iterable_value_type< source_t > &value, const iequality_comparer< xtd::iterable_value_type< source_t > > &comparer) noexcept -> bool
Determines whether a sequence contains a specified element by using a specified equality comparer.
static auto average(source_t &&source) -> double
Computes the average of a sequence of double values.
static auto to_array(const ienumerable< source_t > &source)
Creates a xtd::array <type_t> from an xtd::collections::generic::ienumerable <type_t>.
static auto aggregate(source_t &&source, xtd::iterable_value_type< source_t > &&seed, func_t &&func) -> xtd::iterable_value_type< source_t >
Applies an accumulator function over a sequence. The specified seed value is used as the initial accu...
static auto append(source_t &&source, xtd::iterable_value_type< source_t > &&element) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Appends a value to the end of the sequence.
static auto repeat(const element_t &element, xtd::usize count) -> xtd::collections::generic::enumerable_generator< element_t >
Generates a sequence that contains one repeated value.
static auto range(integer_t start, integer_t count, integer_t step) -> xtd::collections::generic::enumerable_generator< integer_t >
Generates a sequence of integral numbers within a specified range and step.
static auto first(source_t &&source) -> xtd::iterable_value_type< source_t >
Returns the first element of a sequence.
static auto as_enumerable(std::initializer_list< value_t > source) noexcept -> xtd::collections::generic::enumerable_generator< value_t >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
xtd::collections::generic::key_value_pair< key_t, value_t > key_value_pair
Represents the key value pair value type.
Definition enumerable_.hpp:100
static auto order_by(source_t &&source, key_selector_t &&key_selector) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Sorts the elements of a sequence in ascending order according to a key.
static auto min(source_t &&source, selector_t &&selector) -> result_t
Returns the minimum value in a sequence of xtd::numeric values.
static auto count(source_t &&source) noexcept -> xtd::usize
Returns the number of elements in a sequence.
static auto range(integer_t count) -> xtd::collections::generic::enumerable_generator< integer_t >
Generates a sequence of integral numbers within a specified range.
static auto first_or_default(source_t &&source) noexcept -> xtd::iterable_value_type< source_t >
Returns the first element of the sequence that satisfies a condition or a default value if no such el...
static auto reverse(source_t &&source) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Inverts the order of the elements in a sequence.
static auto default_if_empty(source_t &&source, const xtd::iterable_value_type< source_t > &default_value) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns the elements of the specified sequence or the specified value in a singleton collection if th...
static auto skip(source_t &&source, xtd::usize count) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
static auto from(source_t &source) noexcept -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
static auto count(source_t &&source, xtd::iterable_value_type< source_t > &&value) noexcept -> xtd::usize
Returns the number of elements with the specified value.
static auto max(source_t &&source) -> xtd::iterable_value_type< source_t >
Returns the maximum value in a sequence of xtd::numeric values.
static auto take(source_t &&source, const xtd::range &range) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns a specified number of contiguous elements from the start of a sequence.
static auto take_while(source_t &&source, auto &&predicate) -> xtd::collections::generic::enumerable_generator< xtd::iterable_value_type< source_t > >
Returns elements from a sequence as long as a specified condition is true, and then skips the remaini...
static auto any(source_t &&source) noexcept -> bool
Determines whether a sequence contains any elements.
static auto count_by(source_t &&source, key_selector_t &&key_selector, key_equater_t &&key_equater) noexcept -> xtd::collections::generic::enumerable_generator< xtd::collections::generic::key_value_pair< key_t, xtd::usize > >
Returns the count of elements in the source sequence grouped by key.
static auto sequence_equal(first_t &&first, second_t &&second, equality_comparer_t &&comparer) -> bool
Determines whether two sequences are equal by comparing their elements by using a specifie the equali...
static auto to_list(const ienumerable< source_t > &source)
Creates a xtd::collections::generic::list <type_t> from an xtd::collections::generic::ienumerable <ty...
static auto average(source_t &&source) -> xtd::single
Computes the average of a sequence of float values.
static auto average(source_t &&source) -> xtd::optional< double >
Computes the average of a sequence of optional xtd::int32 values.
static auto average(source_t &&source) -> double
Computes the average of a sequence of xtd::int32 values.
Represents a range that has start and end indexes.
Definition range.hpp:38
Definition numeric.hpp:12
Definition real_decimal.hpp:13
Definition real_double.hpp:13
Definition real_single.hpp:13
Definition signed_integer_32.hpp:13
Definition signed_integer_64.hpp:14
Contains xtd::decimal type.
Contains xtd::collections::generic::equality_comparer <type_t> class.
Contains xtd::func_callable concept.
Contains xtd::collections::generic::comparer <type_t> class.
Contains xtd::collections::generic::enumerator <type_t> class.
xtd::raw_type< decltype(*std::begin(std::declval< iterable_t & >()))> iterable_value_type
Represents the orward iterable value type.
Definition iterable_value_type.hpp:29
xtd::delegate< result_t(arguments_t... arguments)> func
Represents a delegate that has variables parameters and returns a value of the type specified by the ...
Definition func.hpp:27
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:38
std::type_info type
Stores information about a type.
Definition type.hpp:23
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:26
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
std::optional< type_t > optional
Represents the optional alias on std::optional.
Definition optional.hpp:26
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
float single
Represents a single-precision floating-point number.
Definition single.hpp:23
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
std::remove_cvref_t< value_t > raw_type
Represents a raw type alias equivalent to std::remove_cvref_t<value_t>.
Definition raw_type.hpp:25
xtd::func< bool, type_t > predicate
Represents a delegate that defines a set of criteria and determines whether the specified object meet...
Definition predicate.hpp:16
Contains xtd::iequatable interface.
Contains xtd::int32 type.
Contains xtd::int64 type.
Contains xtd::integer concept.
Contains xtd::iterable concept.
Contains xtd::iterable_value_type alias.
Contains xtd::collections::generic::helpers::lesser struct.
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
Provides classes and interfaces that support queries that use Language-Integrated Query (LINQ).
Definition enumerable_.hpp:60
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto length() const noexcept -> size_type
Returns the length of the current read_only_span.
Definition read_only_span.hpp:209
constexpr auto size() const noexcept -> size_type
Returns the number of elements.
Definition read_only_span.hpp:213
Contains xtd::numeric concept.
Contains xtd::optional type.
Contains xtd::predicate_callable concept.
Contains xtd::collections::generic::helpers::raw_array class.
Contains xtd::static_object class.
Supports a simple iteration over a generic collection.
Definition enumerator.hpp:39
Defines a key/value pair that can be set or retrieved.
Definition key_value_pair.hpp:37
Represents a type that can be used to index a collection either from the beginning or the end.
Definition index.hpp:38
Contains xtd::usize type.