C++ Library Extensions 2022.12.09
To help learn modern C++ programming
tpf Namespace Reference

Includes subnamespace conversion. More...

Namespaces

namespace  bitwise
 
namespace  chrono_random
 Implements random number generator and stop watch.
 
namespace  container
 
namespace  conversion
 String conversions are implemented.
 
namespace  euclidean
 Implements Euclidean Algorithm for GCD, LCM.
 
namespace  graph
 
namespace  literals
 
namespace  matrix
 Implements set operations.
 
namespace  ncrnpr
 Implements nCr, nPr.
 
namespace  output
 Stream output operators are defined.
 
namespace  parallel
 Implements set operations.
 
namespace  prime
 Implements set operations.
 
namespace  rational
 Implements set operations.
 
namespace  safe_type
 Defines safe type operation.
 
namespace  set
 Implements set operations.
 
namespace  split_range
 
namespace  types
 Type to string name conversions are defined.
 

Classes

struct  boolean
 
class  debug_exception
 This class implements all debugging requirements for C++ Library Extension. More...
 
class  graph
 
struct  set_tag
 
struct  thread_bundle
 

Typedefs

using sstream = output::string_stream
 
template<typename Type >
using remove_cv_ref_t = std::remove_cv_t< std::remove_reference_t< Type > >
 Remove const volatile reference from Type. More...
 
template<typename Type >
using decay_remove_cv_ref_t = std::remove_cv_t< std::remove_reference_t< std::decay_t< Type > > >
 Decay, remove const, volatile, reference. More...
 
template<typename Type >
using decay_remove_ref_t = std::remove_reference_t< std::decay_t< Type > >
 Decay, remove reference. More...
 
template<typename Type >
using primitive_type_t = remove_cv_ref_t< std::remove_pointer_t< decay_remove_cv_ref_t< Type > > >
 Decay, remove const, volatile, reference, then remove pointer and remove const and volatile. More...
 
template<typename SetTagType = set_tag<std::vector, int>>
using set_element_t = typename SetTagType::set_element_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using set_t = typename SetTagType::set_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using sets_t = typename SetTagType::sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using set_of_sets_t = typename SetTagType::set_of_sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using sets_of_sets_t = typename SetTagType::sets_of_sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using duet_set_element_t = typename SetTagType::duet_set_element_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using duet_set_t = typename SetTagType::duet_set_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using duet_sets_t = typename SetTagType::duet_sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using duet_set_of_sets_t = typename SetTagType::duet_set_of_sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using duet_sets_of_sets_t = typename SetTagType::duet_sets_of_sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using set_of_duets_t = typename SetTagType::set_of_duets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using trio_set_element_t = typename SetTagType::trio_set_element_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using trio_set_t = typename SetTagType::trio_set_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using trio_sets_t = typename SetTagType::trio_sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using trio_set_of_sets_t = typename SetTagType::trio_set_of_sets_t
 
template<typename SetTagType = set_tag<std::vector, int>>
using trio_sets_of_sets_t = typename SetTagType::trio_sets_of_sets_t
 
template<typename ElementType = int, typename NodeIndexType = int, template< typename, typename... > class NodeContainerType = std::list, template< typename, typename... > class IndexContainerType = std::vector>
using graph_t = graph< ElementType, NodeIndexType, NodeContainerType, IndexContainerType >
 

Enumerations

enum class  direction_t { left , right }
 

Functions

template<typename CallbackType , typename... ArgTypes>
void visit (const ncrnpr::range_t &range, CallbackType &&callback, ArgTypes &&... args)
 Calls callback(args...) function in sequence. Iteration index is not passed to the callback() function. More...
 
template<typename CallbackType , typename... ArgTypes>
void visit_parallel (unsigned int thread_count, const ncrnpr::range_t &range, CallbackType &&callback, ArgTypes &&... args)
 Calls callback(args...) function in parallel. Iteration index is not passed to the callback() function. More...
 
template<typename CallbackType , typename... ArgTypes>
void visit_index (const ncrnpr::range_t &range, CallbackType &&callback, ArgTypes &&... args)
 Calls callback(index, args...) in sequence. Iteration index is passed to the callback() function. More...
 
template<typename CallbackType , typename... ArgTypes>
void visit_index_parallel (unsigned int thread_count, const ncrnpr::range_t &range, CallbackType &&callback, ArgTypes &&... args)
 calls callback(index, args...) in parallel. Iteration index is passed to the callback() as the first argument More...
 
template<typename NRType , typename CallbackType , typename... ArgTypes>
void visit_permutations (NRType n, NRType r, const ncrnpr::range_t &range, CallbackType &&callback, ArgTypes &&... args)
 Calls callback(enumerated_permutation, args...) in sequence. More...
 
template<typename TCType , typename NRType , typename CallbackType , typename... ArgTypes>
void visit_permutations_parallel (TCType thread_count, NRType n, NRType r, CallbackType &&callback, ArgTypes &&... args)
 Calls callback(enumerated_permutation, args...) in parallel. More...
 
template<typename CallbackType , typename... ArgTypes>
void parallel_visit_permutations (const std::pair< size_t, size_t > permutation_specification, CallbackType &&callback, ArgTypes &&... args)
 
template<typename CallbackType , typename... ArgTypes>
void visit_combinations_and_offsets (const std::pair< size_t, size_t > &combination_specification, const ncrnpr::range_t &range, CallbackType &&callback, ArgTypes &&... args)
 Calls callback(enumerated_combination, args...) in sequence enumerated_combination is generated and pass to the callback() as the first argument. More...
 
template<typename NRType , typename CallbackType , typename... ArgTypes>
void visit_combinations (NRType n, NRType r, const ncrnpr::range_t &range, CallbackType &&callback, ArgTypes &&... args)
 
template<typename NRType , typename CallbackType , typename... ArgTypes>
void parallel_visit_combinations_and_complements (NRType n, NRType r, CallbackType &&callback, ArgTypes &&... args)
 
template<typename NRType , typename CallbackType , typename... ArgTypes>
void parallel_visit_combinations (NRType n, NRType r, CallbackType &&callback, ArgTypes &&... args)
 
template<typename ThreadCountType , typename CallbackType , typename... ArgTypes>
void visit_combinations_and_offsets_parallel (ThreadCountType thread_count, const std::pair< size_t, size_t > &combination_specification, CallbackType &&callback, ArgTypes &&... args)
 Calls callback(enumerated_combination, args...) in parallel. More...
 
template<typename Type_1 , typename Type_2 >
auto maximum (Type_1 a, Type_2 b)
 
template<typename Type_1 , typename Type_2 , typename... Types>
auto maximum (Type_1 a, Type_2 b, Types... args)
 
template<typename Type_1 , typename Type_2 >
auto minimum (Type_1 a, Type_2 b)
 
template<typename Type_1 , typename Type_2 , typename... Types>
auto minimum (Type_1 a, Type_2 b, Types... args)
 
template<typename Type >
constexpr unsigned long long two_power_n (Type n)
 
template<typename IndexType , typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator>
auto index_to_iterator (ContainerType &&cntr, IndexType &&index)
 
template<typename IndexType , typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename reverse_iterator_type = typename container_t::reverse_iterator>
auto index_to_reverse_iterator (ContainerType &&cntr, IndexType &&offset)
 
template<typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator>
auto iterator_to_index (ContainerType &&cntr, iterator_type &&offset)
 
template<typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename reverse_iterator_type = typename container_t::reverse_iterator>
auto reverse_iterator_to_index (ContainerType &&cntr, reverse_iterator_type &&offset)
 
template<typename ReverseIteratorType , typename reverse_iterator_type = std::remove_reference_t<ReverseIteratorType>>
auto reverse_iterator_to_iterator (ReverseIteratorType &&itr)
 
template<typename IteratorType , typename iterator_type = std::remove_reference_t<IteratorType>>
auto iterator_to_reverse_iterator (IteratorType &&itr)
 
template<direction_t direction = direction_t::left, typename ContainerType = std::vector<int>, typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator, typename reverse_iterator_type = typename container_t::reverse_iterator>
auto make_rotator (ContainerType &&cntr)
 
template<direction_t direction = direction_t::left, typename ContainerType = std::vector<int>, typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator, typename reverse_iterator_type = typename container_t::reverse_iterator, typename execution_policy_type = std::execution::parallel_unsequenced_policy>
auto make_rotator (ContainerType &&cntr, execution_policy_type policy)
 
template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto find_range_iterators (ForwardIterator first, ForwardIterator last, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto find_range_indices (ForwardIterator first, ForwardIterator last, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto find_range_iterators (const ContainerType< EleType, Types... > &container, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto find_range_indices (const ContainerType< EleType, Types... > &container, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto binary_find_iterator (ForwardIterator first, ForwardIterator last, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto binary_find_index (ForwardIterator first, ForwardIterator last, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto binary_find_iterator (const ContainerType< EleType, Types... > &container, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto binary_find_bool_iterator_pair (ForwardIterator first, ForwardIterator last, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto binary_find_bool_iterator_pair (const ContainerType< EleType, Types... > &container, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto binary_find_index (const ContainerType< EleType, Types... > &container, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto binary_find_bool_index_pair (ForwardIterator first, ForwardIterator last, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto binary_find_bool_index_pair (const ContainerType< EleType, Types... > &container, const EleType &value, CompareCallbackType &&compare_callback=CompareCallbackType{})
 
template<typename ContainerType , typename IndexType >
decltype(auto) get_element (ContainerType container, IndexType index)
 
template<template< typename, typename... > class ContainerType, typename Type , typename... Types>
decltype(auto) make_random_access_container (Type &&arg, Types &&... args)
 
template<typename Type , typename... Types>
decltype(auto) make_vector (Type &&arg, Types &&... args)
 
template<typename Type , typename... Types>
decltype(auto) make_deque (Type &&arg, Types &&... args)
 
template<typename Type , typename... Types>
decltype(auto) make_container (Type &&arg, Types &&... args)
 
template<template< typename, typename... > class ContainerType, typename Type , typename... Types>
decltype(auto) make_container (Type &&arg, Types &&... args)
 
template<typename Type , typename... Types>
decltype(auto) create_container (Type &&arg, Types &&... args)
 
template<typename Type , typename... Types>
decltype(auto) make_variants (Type &&arg, Types &&... args)
 
template<typename ContainerType >
decltype(auto) reverse (ContainerType &&container)
 
template<typename ElementType , size_t ElementCount>
decltype(auto) reverse (ElementType(&array)[ElementCount])
 
template<typename Type , typename... Types>
decltype(auto) reverse (Type &&arg, Types &&... args)
 
template<typename IndexType , typename ContainerType , typename iterator_type >
auto index_to_iterator (ContainerType &&cntr, IndexType &&index)
 
template<typename IndexType , typename ContainerType , typename reverse_iterator_type >
auto index_to_reverse_iterator (ContainerType &&cntr, IndexType &&index)
 
template<typename ContainerType , typename iterator_type >
auto iterator_to_index (ContainerType &&cntr, iterator_type &&itr)
 
template<typename ContainerType , typename reverse_iterator_type >
auto reverse_iterator_to_index (ContainerType &&cntr, reverse_iterator_type &&rev_itr)
 

Variables

constexpr auto flush = output::flush_stream{}
 
constexpr auto nl = output::new_line{}
 
constexpr auto nL = output::new_Line{}
 
constexpr auto endl = output::new_line_flush{}
 
constexpr auto endL = output::new_Line_flush{}
 
template<typename Type >
constexpr bool is_const_v = std::is_const_v<std::remove_reference_t<Type>>
 
template<typename Type >
constexpr bool is_const_reference_v
 Test if Type is reference to const object. More...
 

Detailed Description

Includes subnamespace conversion.

includes subnamespace output.

Root namespace for C++ Extension Library.

Typedef Documentation

◆ decay_remove_cv_ref_t

template<typename Type >
using tpf::decay_remove_cv_ref_t = typedef std::remove_cv_t<std::remove_reference_t<std::decay_t<Type> >>

Decay, remove const, volatile, reference.

Template Parameters
Type

Definition at line 162 of file tpf_types.hpp.

◆ decay_remove_ref_t

template<typename Type >
using tpf::decay_remove_ref_t = typedef std::remove_reference_t<std::decay_t<Type> >

Decay, remove reference.

Template Parameters
Type

Definition at line 170 of file tpf_types.hpp.

◆ duet_set_element_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::duet_set_element_t = typedef typename SetTagType::duet_set_element_t

Definition at line 1978 of file tpf_types.hpp.

◆ duet_set_of_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::duet_set_of_sets_t = typedef typename SetTagType::duet_set_of_sets_t

Definition at line 1987 of file tpf_types.hpp.

◆ duet_set_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::duet_set_t = typedef typename SetTagType::duet_set_t

Definition at line 1981 of file tpf_types.hpp.

◆ duet_sets_of_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::duet_sets_of_sets_t = typedef typename SetTagType::duet_sets_of_sets_t

Definition at line 1990 of file tpf_types.hpp.

◆ duet_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::duet_sets_t = typedef typename SetTagType::duet_sets_t

Definition at line 1984 of file tpf_types.hpp.

◆ graph_t

template<typename ElementType = int, typename NodeIndexType = int, template< typename, typename... > class NodeContainerType = std::list, template< typename, typename... > class IndexContainerType = std::vector>
using tpf::graph_t = typedef graph<ElementType, NodeIndexType, NodeContainerType, IndexContainerType>

Definition at line 165 of file 059-graph01.hpp.

◆ primitive_type_t

template<typename Type >
using tpf::primitive_type_t = typedef remove_cv_ref_t<std::remove_pointer_t<decay_remove_cv_ref_t<Type> >>

Decay, remove const, volatile, reference, then remove pointer and remove const and volatile.

Template Parameters
Type

Definition at line 178 of file tpf_types.hpp.

◆ remove_cv_ref_t

template<typename Type >
using tpf::remove_cv_ref_t = typedef std::remove_cv_t<std::remove_reference_t<Type> >

Remove const volatile reference from Type.

Template Parameters
Typefor remove const volatile and reference.

Definition at line 151 of file tpf_types.hpp.

◆ set_element_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::set_element_t = typedef typename SetTagType::set_element_t

Definition at line 1963 of file tpf_types.hpp.

◆ set_of_duets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::set_of_duets_t = typedef typename SetTagType::set_of_duets_t

Definition at line 1993 of file tpf_types.hpp.

◆ set_of_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::set_of_sets_t = typedef typename SetTagType::set_of_sets_t

Definition at line 1972 of file tpf_types.hpp.

◆ set_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::set_t = typedef typename SetTagType::set_t

Definition at line 1966 of file tpf_types.hpp.

◆ sets_of_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::sets_of_sets_t = typedef typename SetTagType::sets_of_sets_t

Definition at line 1975 of file tpf_types.hpp.

◆ sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::sets_t = typedef typename SetTagType::sets_t

Definition at line 1969 of file tpf_types.hpp.

◆ sstream

Definition at line 969 of file tpf_output.hpp.

◆ trio_set_element_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::trio_set_element_t = typedef typename SetTagType::trio_set_element_t

Definition at line 1996 of file tpf_types.hpp.

◆ trio_set_of_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::trio_set_of_sets_t = typedef typename SetTagType::trio_set_of_sets_t

Definition at line 2005 of file tpf_types.hpp.

◆ trio_set_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::trio_set_t = typedef typename SetTagType::trio_set_t

Definition at line 1999 of file tpf_types.hpp.

◆ trio_sets_of_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::trio_sets_of_sets_t = typedef typename SetTagType::trio_sets_of_sets_t

Definition at line 2008 of file tpf_types.hpp.

◆ trio_sets_t

template<typename SetTagType = set_tag<std::vector, int>>
using tpf::trio_sets_t = typedef typename SetTagType::trio_sets_t

Definition at line 2002 of file tpf_types.hpp.

Enumeration Type Documentation

◆ direction_t

enum class tpf::direction_t
strong
Enumerator
left 
right 

Definition at line 143 of file tpf_types.hpp.

Function Documentation

◆ binary_find_bool_index_pair() [1/2]

template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto tpf::binary_find_bool_index_pair ( const ContainerType< EleType, Types... > &  container,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1629 of file tpf_types.hpp.

◆ binary_find_bool_index_pair() [2/2]

template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto tpf::binary_find_bool_index_pair ( ForwardIterator  first,
ForwardIterator  last,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1615 of file tpf_types.hpp.

◆ binary_find_bool_iterator_pair() [1/2]

template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto tpf::binary_find_bool_iterator_pair ( const ContainerType< EleType, Types... > &  container,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1598 of file tpf_types.hpp.

◆ binary_find_bool_iterator_pair() [2/2]

template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto tpf::binary_find_bool_iterator_pair ( ForwardIterator  first,
ForwardIterator  last,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1586 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ binary_find_index() [1/2]

template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto tpf::binary_find_index ( const ContainerType< EleType, Types... > &  container,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1607 of file tpf_types.hpp.

◆ binary_find_index() [2/2]

template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto tpf::binary_find_index ( ForwardIterator  first,
ForwardIterator  last,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1565 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ binary_find_iterator() [1/2]

template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto tpf::binary_find_iterator ( const ContainerType< EleType, Types... > &  container,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1578 of file tpf_types.hpp.

◆ binary_find_iterator() [2/2]

template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto tpf::binary_find_iterator ( ForwardIterator  first,
ForwardIterator  last,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1556 of file tpf_types.hpp.

◆ create_container()

template<typename Type , typename... Types>
decltype(auto) tpf::create_container ( Type &&  arg,
Types &&...  args 
)

Definition at line 7943 of file tpf_types.hpp.

Here is the call graph for this function:

◆ find_range_indices() [1/2]

template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto tpf::find_range_indices ( const ContainerType< EleType, Types... > &  container,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1548 of file tpf_types.hpp.

◆ find_range_indices() [2/2]

template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto tpf::find_range_indices ( ForwardIterator  first,
ForwardIterator  last,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1528 of file tpf_types.hpp.

◆ find_range_iterators() [1/2]

template<typename EleType , template< typename, typename... > class ContainerType, typename... Types, typename CompareCallbackType = std::less<>>
auto tpf::find_range_iterators ( const ContainerType< EleType, Types... > &  container,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1539 of file tpf_types.hpp.

◆ find_range_iterators() [2/2]

template<typename ForwardIterator , typename EleType , typename CompareCallbackType = std::less<>>
auto tpf::find_range_iterators ( ForwardIterator  first,
ForwardIterator  last,
const EleType &  value,
CompareCallbackType &&  compare_callback = CompareCallbackType{} 
)

Definition at line 1519 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ get_element()

template<typename ContainerType , typename IndexType >
decltype(auto) tpf::get_element ( ContainerType  container,
IndexType  index 
)

Definition at line 7899 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ index_to_iterator() [1/2]

template<typename IndexType , typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator>
auto tpf::index_to_iterator ( ContainerType &&  cntr,
IndexType &&  index 
)

◆ index_to_iterator() [2/2]

template<typename IndexType , typename ContainerType , typename iterator_type >
auto tpf::index_to_iterator ( ContainerType &&  cntr,
IndexType &&  index 
)
inline

Definition at line 7977 of file tpf_types.hpp.

◆ index_to_reverse_iterator() [1/2]

template<typename IndexType , typename ContainerType , typename reverse_iterator_type >
auto tpf::index_to_reverse_iterator ( ContainerType &&  cntr,
IndexType &&  index 
)
inline

Definition at line 7986 of file tpf_types.hpp.

◆ index_to_reverse_iterator() [2/2]

template<typename IndexType , typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename reverse_iterator_type = typename container_t::reverse_iterator>
auto tpf::index_to_reverse_iterator ( ContainerType &&  cntr,
IndexType &&  offset 
)

◆ iterator_to_index() [1/2]

template<typename ContainerType , typename iterator_type >
auto tpf::iterator_to_index ( ContainerType &&  cntr,
iterator_type &&  itr 
)
inline

Definition at line 7996 of file tpf_types.hpp.

◆ iterator_to_index() [2/2]

template<typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator>
auto tpf::iterator_to_index ( ContainerType &&  cntr,
iterator_type &&  offset 
)

◆ iterator_to_reverse_iterator()

template<typename IteratorType , typename iterator_type = std::remove_reference_t<IteratorType>>
auto tpf::iterator_to_reverse_iterator ( IteratorType &&  itr)
inline

Definition at line 1498 of file tpf_types.hpp.

◆ make_container() [1/2]

template<typename Type , typename... Types>
decltype(auto) tpf::make_container ( Type &&  arg,
Types &&...  args 
)

Definition at line 7923 of file tpf_types.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_container() [2/2]

template<template< typename, typename... > class ContainerType, typename Type , typename... Types>
decltype(auto) tpf::make_container ( Type &&  arg,
Types &&...  args 
)

Definition at line 7930 of file tpf_types.hpp.

◆ make_deque()

template<typename Type , typename... Types>
decltype(auto) tpf::make_deque ( Type &&  arg,
Types &&...  args 
)

Definition at line 7917 of file tpf_types.hpp.

Here is the call graph for this function:

◆ make_random_access_container()

template<template< typename, typename... > class ContainerType, typename Type , typename... Types>
decltype(auto) tpf::make_random_access_container ( Type &&  arg,
Types &&...  args 
)

Definition at line 7905 of file tpf_types.hpp.

◆ make_rotator() [1/2]

template<direction_t direction = direction_t::left, typename ContainerType = std::vector<int>, typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator, typename reverse_iterator_type = typename container_t::reverse_iterator>
auto tpf::make_rotator ( ContainerType &&  cntr)

Definition at line 8013 of file tpf_types.hpp.

◆ make_rotator() [2/2]

template<direction_t direction = direction_t::left, typename ContainerType = std::vector<int>, typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename iterator_type = typename container_t::iterator, typename reverse_iterator_type = typename container_t::reverse_iterator, typename execution_policy_type = std::execution::parallel_unsequenced_policy>
auto tpf::make_rotator ( ContainerType &&  cntr,
execution_policy_type  policy 
)

Definition at line 8069 of file tpf_types.hpp.

◆ make_variants()

template<typename Type , typename... Types>
decltype(auto) tpf::make_variants ( Type &&  arg,
Types &&...  args 
)

Definition at line 7951 of file tpf_types.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_vector()

template<typename Type , typename... Types>
decltype(auto) tpf::make_vector ( Type &&  arg,
Types &&...  args 
)

Definition at line 7911 of file tpf_types.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maximum() [1/2]

template<typename Type_1 , typename Type_2 >
auto tpf::maximum ( Type_1  a,
Type_2  b 
)

Definition at line 181 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ maximum() [2/2]

template<typename Type_1 , typename Type_2 , typename... Types>
auto tpf::maximum ( Type_1  a,
Type_2  b,
Types...  args 
)

Definition at line 187 of file tpf_types.hpp.

Here is the call graph for this function:

◆ minimum() [1/2]

template<typename Type_1 , typename Type_2 >
auto tpf::minimum ( Type_1  a,
Type_2  b 
)

Definition at line 196 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ minimum() [2/2]

template<typename Type_1 , typename Type_2 , typename... Types>
auto tpf::minimum ( Type_1  a,
Type_2  b,
Types...  args 
)

Definition at line 202 of file tpf_types.hpp.

Here is the call graph for this function:

◆ parallel_visit_combinations()

template<typename NRType , typename CallbackType , typename... ArgTypes>
void tpf::parallel_visit_combinations ( NRType  n,
NRType  r,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Definition at line 1872 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parallel_visit_combinations_and_complements()

template<typename NRType , typename CallbackType , typename... ArgTypes>
void tpf::parallel_visit_combinations_and_complements ( NRType  n,
NRType  r,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Definition at line 1836 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parallel_visit_permutations()

template<typename CallbackType , typename... ArgTypes>
void tpf::parallel_visit_permutations ( const std::pair< size_t, size_t >  permutation_specification,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Definition at line 1739 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverse() [1/3]

template<typename ContainerType >
decltype(auto) tpf::reverse ( ContainerType &&  container)

Definition at line 7959 of file tpf_types.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverse() [2/3]

template<typename ElementType , size_t ElementCount>
decltype(auto) tpf::reverse ( ElementType(&)  array[ElementCount])

Definition at line 7965 of file tpf_types.hpp.

Here is the call graph for this function:

◆ reverse() [3/3]

template<typename Type , typename... Types>
decltype(auto) tpf::reverse ( Type &&  arg,
Types &&...  args 
)

Definition at line 7971 of file tpf_types.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverse_iterator_to_index() [1/2]

template<typename ContainerType , typename container_t = tpf::remove_cv_ref_t<ContainerType>, typename reverse_iterator_type = typename container_t::reverse_iterator>
auto tpf::reverse_iterator_to_index ( ContainerType &&  cntr,
reverse_iterator_type &&  offset 
)

◆ reverse_iterator_to_index() [2/2]

template<typename ContainerType , typename reverse_iterator_type >
auto tpf::reverse_iterator_to_index ( ContainerType &&  cntr,
reverse_iterator_type &&  rev_itr 
)
inline

Definition at line 8002 of file tpf_types.hpp.

◆ reverse_iterator_to_iterator()

template<typename ReverseIteratorType , typename reverse_iterator_type = std::remove_reference_t<ReverseIteratorType>>
auto tpf::reverse_iterator_to_iterator ( ReverseIteratorType &&  itr)
inline

Definition at line 1491 of file tpf_types.hpp.

◆ two_power_n()

template<typename Type >
constexpr unsigned long long tpf::two_power_n ( Type  n)
constexpr

Definition at line 254 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ visit()

template<typename CallbackType , typename... ArgTypes>
void tpf::visit ( const ncrnpr::range_t range,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Calls callback(args...) function in sequence. Iteration index is not passed to the callback() function.

Template Parameters
CallbackType
ArgTypes
Parameters
rangefor the iteration range [start, end)
callbackfor Callback routine
argsfor callback(args...)

Definition at line 1545 of file tpf_ncrnpr.hpp.

◆ visit_combinations()

template<typename NRType , typename CallbackType , typename... ArgTypes>
void tpf::visit_combinations ( NRType  n,
NRType  r,
const ncrnpr::range_t range,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Definition at line 1813 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ visit_combinations_and_offsets()

template<typename CallbackType , typename... ArgTypes>
void tpf::visit_combinations_and_offsets ( const std::pair< size_t, size_t > &  combination_specification,
const ncrnpr::range_t range,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Calls callback(enumerated_combination, args...) in sequence enumerated_combination is generated and pass to the callback() as the first argument.

Template Parameters
CallbackType
ArgTypes
Parameters
combination_specificationfor nCr or (n, r), the binomial coefficient
rangefor [start, end) where start <= end, 0 <= start, or end <= nCr
callbackfor Callback routine.
argsfor callback(enumerated_combination, args...)

Definition at line 1789 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ visit_combinations_and_offsets_parallel()

template<typename ThreadCountType , typename CallbackType , typename... ArgTypes>
void tpf::visit_combinations_and_offsets_parallel ( ThreadCountType  thread_count,
const std::pair< size_t, size_t > &  combination_specification,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Calls callback(enumerated_combination, args...) in parallel.

Template Parameters
ThreadCountType
CallbackType
ArgTypes
Parameters
thread_countfor number of the concurrent threads to execute callback()
combination_specificationfor nCr, or (n, r)
callbackfor Callback routine
argsfor callback(enumerated_combination, args...)

Definition at line 1921 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ visit_index()

template<typename CallbackType , typename... ArgTypes>
void tpf::visit_index ( const ncrnpr::range_t range,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Calls callback(index, args...) in sequence. Iteration index is passed to the callback() function.

Template Parameters
CallbackType
ArgTypes
Parameters
rangefor the iteration range [start, end)
callbackfor Callback routine.
argsfor callback(index, args...)

Definition at line 1611 of file tpf_ncrnpr.hpp.

◆ visit_index_parallel()

template<typename CallbackType , typename... ArgTypes>
void tpf::visit_index_parallel ( unsigned int  thread_count,
const ncrnpr::range_t range,
CallbackType &&  callback,
ArgTypes &&...  args 
)

calls callback(index, args...) in parallel. Iteration index is passed to the callback() as the first argument

Template Parameters
CallbackType
ArgTypes
Parameters
thread_countfor the number of concurrent threads to execute callback() function
rangefor the iteration range [start, end)
callbackfor Callback routine
argsfor callback(index, args...)

Definition at line 1631 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ visit_parallel()

template<typename CallbackType , typename... ArgTypes>
void tpf::visit_parallel ( unsigned int  thread_count,
const ncrnpr::range_t range,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Calls callback(args...) function in parallel. Iteration index is not passed to the callback() function.

Template Parameters
CallbackType
ArgTypes
Parameters
thread_countfor the number of concurrent threads to execute callback()
rangefor the iteration range [start, end)
callbackfor Callback routine to call concurrently
argsfor callback(args...)

Definition at line 1565 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ visit_permutations()

template<typename NRType , typename CallbackType , typename... ArgTypes>
void tpf::visit_permutations ( NRType  n,
NRType  r,
const ncrnpr::range_t range,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Calls callback(enumerated_permutation, args...) in sequence.

Template Parameters
NRType
CallbackType
ArgTypes
Parameters
nfor n in nPr
rfor r in nPr
rangefor the iteration range [start, end)
callbackfor Callback routine
argsfor callback(enumerated_permutation, args...)

Definition at line 1676 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ visit_permutations_parallel()

template<typename TCType , typename NRType , typename CallbackType , typename... ArgTypes>
void tpf::visit_permutations_parallel ( TCType  thread_count,
NRType  n,
NRType  r,
CallbackType &&  callback,
ArgTypes &&...  args 
)

Calls callback(enumerated_permutation, args...) in parallel.

Template Parameters
TCType
NRType
CallbackType
ArgTypes
Parameters
thread_countfor number of the concurrent threads to execute callback()
nfor n in nPr
rfor r in nPr
callbackfor Callback routine
argsfor callback(enumerated_permutation, args...)

Definition at line 1706 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ endl

constexpr auto tpf::endl = output::new_line_flush{}
constexpr

Definition at line 973 of file tpf_output.hpp.

◆ endL

constexpr auto tpf::endL = output::new_Line_flush{}
constexpr

Definition at line 974 of file tpf_output.hpp.

◆ flush

constexpr auto tpf::flush = output::flush_stream{}
constexpr

Definition at line 970 of file tpf_output.hpp.

◆ is_const_reference_v

template<typename Type >
constexpr bool tpf::is_const_reference_v
constexpr
Initial value:
=
std::is_reference_v<Type> && std::is_const_v<std::remove_reference_t<Type>>

Test if Type is reference to const object.

Template Parameters
Type

Definition at line 216 of file tpf_types.hpp.

◆ is_const_v

template<typename Type >
constexpr bool tpf::is_const_v = std::is_const_v<std::remove_reference_t<Type>>
constexpr

Definition at line 154 of file tpf_types.hpp.

◆ nl

constexpr auto tpf::nl = output::new_line{}
constexpr

Definition at line 971 of file tpf_output.hpp.

◆ nL

constexpr auto tpf::nL = output::new_Line{}
constexpr

Definition at line 972 of file tpf_output.hpp.