•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Search Results
mpqc::utility::TupleGenerator< R, HostRange, Container, ConstHostRangePtr > Class Template Reference
Collaboration diagram for mpqc::utility::TupleGenerator< R, HostRange, Container, ConstHostRangePtr >:

Documentation
template<size_t R, typename HostRange, typename Container, typename ConstHostRangePtr = const HostRange*>
class mpqc::utility::TupleGenerator< R, HostRange, Container, ConstHostRangePtr >
Generates ordered rank-R tuples of elements from a host range of size >= R. E.g., TupleGenerator<2>
over {0
,1,2,3} produces sequence {{0
,1},{0,2},{0,3},{1,2},{1,3},{2,3}}.
Public Types | |
using base_type = utility::GeneratorRangeFacade< TupleGenerator< R, HostRange, Container, ConstHostRangePtr >, Container > | |
using value_type = Container | |
using Index = std::array< std::int64_t, std::max(size_t{1}, R)> | |
![]() | |
typedef GeneratorIterator< TupleGenerator< R, HostRange, Container, const HostRange * >, TupleGenerator< R, HostRange, Container, const HostRange * > *, Container > iterator | |
typedef GeneratorIterator< TupleGenerator< R, HostRange, Container, const HostRange * >, TupleGenerator< R, HostRange, Container, const HostRange * > *, const Container > const_iterator | |
Public Member Functions | |
TupleGenerator (ConstHostRangePtr hostptr, Index idx) | |
TupleGenerator (ConstHostRangePtr hostptr) | |
TupleGenerator (const TupleGenerator &)=default | |
TupleGenerator (TupleGenerator &&)=default | |
TupleGenerator & operator= (const TupleGenerator &)=default | |
TupleGenerator & operator= (TupleGenerator &&)=default | |
const ConstHostRangePtr & host_range_ptr () const | |
operator bool () const | |
TupleGenerator & operator++ () | |
const value_type & operator* () const | |
bool operator== (const TupleGenerator &other) const | |
const_iterator begin () | |
const_iterator end () const | |
![]() | |
const_iterator begin () | |
const_iterator end () const | |
Static Public Member Functions | |
static TupleGenerator make_end (ConstHostRangePtr hostptr) | |
Member Typedef Documentation
◆ base_type
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
using mpqc::utility::TupleGenerator< R, HostRange, Container, ConstHostRangePtr >::base_type = utility::GeneratorRangeFacade< TupleGenerator<R, HostRange, Container, ConstHostRangePtr>, Container> |
◆ Index
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
using mpqc::utility::TupleGenerator< R, HostRange, Container, ConstHostRangePtr >::Index = std::array<std::int64_t, std::max(size_t{1}, R)> |
for rank-0 need 1 element to be able to distinguish first and last elements
◆ value_type
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
using mpqc::utility::TupleGenerator< R, HostRange, Container, ConstHostRangePtr >::value_type = Container |
Constructor & Destructor Documentation
◆ TupleGenerator() [1/4]
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
constructs a generator that will start from the given index idx
- Parameters
-
[in] hostptr pointer to the host range [in] idx indices of the elements of the host range that constitute the current tuple value
- Precondition
hostptr != nullptr && size(*hostptr) > 0
◆ TupleGenerator() [2/4]
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
constructs a generator that will start from the beginning
- Parameters
-
[in] hostptr pointer to the host range
◆ TupleGenerator() [3/4]
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
default |
◆ TupleGenerator() [4/4]
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
default |
Member Function Documentation
◆ begin()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
◆ end()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
◆ host_range_ptr()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
- Returns
- const reference to the host range pointer
◆ make_end()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inlinestatic |
constructs a generator that will point to the end
- Parameters
-
[in] hostptr pointer to the host range
◆ operator bool()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inlineexplicit |
- Returns
- true if not at the end
◆ operator*()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
◆ operator++()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
◆ operator=() [1/2]
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
default |
◆ operator=() [2/2]
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
default |
◆ operator==()
template<size_t R, typename HostRange , typename Container , typename ConstHostRangePtr = const HostRange*>
|
inline |
The documentation for this class was generated from the following file:
- mpqc/util/misc/generator.h