TiledArray::expressions::detail Namespace Reference

Functions

template<typename InIter1 , typename InIter2 >
void find_common (InIter1 first1, const InIter1 last1, InIter2 first2, const InIter2 last2, std::pair< InIter1, InIter1 > &common1, std::pair< InIter2, InIter2 > &common2)
 Finds the range of common elements for two sets of iterators. More...
 
Permutation var_perm (const IndexList &l, const IndexList &r)
 
BipartitePermutation var_perm (const BipartiteIndexList &l, const BipartiteIndexList &r)
 

Function Documentation

◆ find_common()

template<typename InIter1 , typename InIter2 >
void TiledArray::expressions::detail::find_common ( InIter1  first1,
const InIter1  last1,
InIter2  first2,
const InIter2  last2,
std::pair< InIter1, InIter1 > &  common1,
std::pair< InIter2, InIter2 > &  common2 
)

Finds the range of common elements for two sets of iterators.

This function finds the first contiguous set of elements equivalent in two lists. Two pairs of iterators are returned via output parameters common1 and common2. These two sets of output iterators point to the first range of contiguous, equivalent elements in the two lists. If no common elements far found; then common1.first and common1.second both are equal to last1, and likewise for common2.

Template Parameters
InIter1The input iterator type for the first range of elements.
InIter2The input iterator type for the second range of elements.
Parameters
[in]first1An input iterator pointing to the beginning of the first range of elements to be compared.
[in]last1An input iterator pointing to one past the end of the first range of elements to be compared.
[in]first2An input iterator pointing to the beginning of the second range of elements to be compared.
[in]last2An input iterator pointing to one past the end of the second range of elements to be compared.
[out]common1A pair of iterators where common1.first points to the first common element, and common1.second points to one past the last common element in the first list.
[out]common2A pair of iterators where common1.first points to the first common element, and common1.second points to one past the last common element in the second list.

Definition at line 70 of file index_list.h.

◆ var_perm() [1/2]

BipartitePermutation TiledArray::expressions::detail::var_perm ( const BipartiteIndexList l,
const BipartiteIndexList r 
)
inline

Definition at line 844 of file index_list.h.

Here is the call graph for this function:

◆ var_perm() [2/2]

Permutation TiledArray::expressions::detail::var_perm ( const IndexList l,
const IndexList r 
)
inline

Definition at line 829 of file index_list.h.

Here is the caller graph for this function: