SUNphi
1.0
|
#include <IntSeq.hpp>
Classes | |
struct | _AppendFirstN |
struct | _AppendFirstN< false, N, IntSeq< R... > > |
struct | _AppendFirstN< true, N, IntSeq< HeadR, TailR... > > |
Public Types | |
template<int I> | |
using | Add = IntSeq<(Ints+I)... > |
Defines a new integer sequence incremented by a constant I. | |
template<int I> | |
using | Sub = Add<-I > |
Defines a new integer sequence decreased by a constant I. | |
template<int I> | |
using | Mul = IntSeq<(Ints *I)... > |
Define a new integer sequence inflated by a constant factor I. | |
template<int I> | |
using | Div = TypeIf< I!=0, Mul< 1/I >> |
Define a new integer sequence decreased by a constant factor I. | |
template<int N, typename ISeq > | |
using | AppendFirstN = typename _AppendFirstN<(N >0), N, ISeq >::type |
Static Public Member Functions | |
template<int I> | |
static constexpr int | element () |
Get the I element of the sequence. | |
Static Public Attributes | |
static constexpr int | size |
Length of the sequence of integer. More... | |
static constexpr std::array< int, size > | array {Ints...} |
Returns a constexpr array containing the Ints . | |
static constexpr int | hSum |
Sum of all elements. More... | |
template<int I> | |
static constexpr int | hSumFirst |
Sum of all elements. More... | |
template<int I> | |
static constexpr int | firstNon |
Take first position wher I does not occur. More... | |
static constexpr int | hMul |
Product of all elements. More... | |
static constexpr int | max |
Returns the maximal element of the list. More... | |
static constexpr int | first |
Get the first element of the sequence. More... | |
static constexpr int | last |
Get the last element of the sequence. More... | |
static constexpr int | isOrdered |
Determine whether the IntSeq elements are ordered or not. More... | |
static constexpr int | isOrderedUnique |
Determine whether the IntSeq elements are ordered and different or not. More... | |
template<typename Is , typename = EnableIf<isIntSeq<Is>>> | |
static constexpr bool | isSubsetOf |
A struct holding a sequence of integer (similar to stdlib).
The integers
are held as parameters of the class. To intercept them, use the class in a consmett in which the integer list are deduced as template parameter, as in this example:
Ints | the list of integer |
Definition at line 41 of file IntSeq.hpp.
using SUNphi::IntSeq< Ints >::AppendFirstN = typename _AppendFirstN<(N>0),N,ISeq>::type |
Append the first N id of another IntSeq
Gives visibility to internal implementation
Definition at line 191 of file IntSeq.hpp.
|
static |
Get the first element of the sequence.
Definition at line 101 of file IntSeq.hpp.
Take first position wher I does not occur.
Definition at line 62 of file IntSeq.hpp.
|
static |
Product of all elements.
Definition at line 66 of file IntSeq.hpp.
|
static |
Sum of all elements.
Definition at line 52 of file IntSeq.hpp.
Sum of all elements.
Definition at line 57 of file IntSeq.hpp.
|
static |
Determine whether the IntSeq elements are ordered or not.
Definition at line 109 of file IntSeq.hpp.
|
static |
Determine whether the IntSeq elements are ordered and different or not.
Definition at line 113 of file IntSeq.hpp.
|
static |
Determine whether the elements are contained
Example
Definition at line 149 of file IntSeq.hpp.
|
static |
Get the last element of the sequence.
Definition at line 105 of file IntSeq.hpp.
|
static |
Returns the maximal element of the list.
Definition at line 90 of file IntSeq.hpp.
|
static |
Length of the sequence of integer.
Definition at line 45 of file IntSeq.hpp.