TiledArray::BipartitePermutation Class Reference

Documentation

Permutation of a bipartite set.

Definition at line 610 of file permutation.h.

Public Types

using index_type = Permutation::index_type
 
template<typename T >
using vector = Permutation::vector< T >
 

Public Member Functions

 BipartitePermutation ()=default
 
 BipartitePermutation (const BipartitePermutation &)=default
 
 BipartitePermutation (BipartitePermutation &&)=default
 
 ~BipartitePermutation ()=default
 
BipartitePermutationoperator= (const BipartitePermutation &)=default
 
BipartitePermutationoperator= (BipartitePermutation &&other)=default
 
 operator bool () const
 Bool conversion. More...
 
auto size () const
 Domain size accessor. More...
 
auto dim () const
 Domain size accessor. More...
 
auto begin () const
 Begin element iterator factory function. More...
 
auto cbegin () const
 Begin element iterator factory function. More...
 
auto end () const
 End element iterator factory function. More...
 
auto cend () const
 End element iterator factory function. More...
 
 operator Permutation & () &
 
 operator Permutation && () &&
 
 operator const Permutation & () const &
 
 BipartitePermutation (const Permutation &p, index_type second_partition_size=0)
 
 BipartitePermutation (const Permutation &first, const Permutation &second)
 
template<typename InIter , typename std::enable_if< detail::is_input_iterator< InIter >::value >::type * = nullptr>
 BipartitePermutation (InIter first, InIter last, index_type second_partition_size=0)
 Construct permutation from a range [first,last) More...
 
template<typename Index , typename = std::enable_if_t<detail::is_integral_range_v<Index>>>
 BipartitePermutation (const Index &a, index_type second_partition_size=0)
 Array constructor. More...
 
 BipartitePermutation (vector< index_type > &&a, index_type second_partition_size=0)
 std::vector move constructor More...
 
const Permutationfirst () const
 
const Permutationsecond () const
 
index_type first_size () const
 
index_type second_size () const
 
template<typename Archive >
void serialize (Archive &ar)
 Serialize permutation. More...
 

Friends

bool operator== (const BipartitePermutation &p1, const BipartitePermutation &p2)
 Permutation equality operator. More...
 

Member Typedef Documentation

◆ index_type

◆ vector

Definition at line 614 of file permutation.h.

Constructor & Destructor Documentation

◆ BipartitePermutation() [1/8]

TiledArray::BipartitePermutation::BipartitePermutation ( )
default

◆ BipartitePermutation() [2/8]

TiledArray::BipartitePermutation::BipartitePermutation ( const BipartitePermutation )
default

◆ BipartitePermutation() [3/8]

TiledArray::BipartitePermutation::BipartitePermutation ( BipartitePermutation &&  )
default

◆ ~BipartitePermutation()

TiledArray::BipartitePermutation::~BipartitePermutation ( )
default

◆ BipartitePermutation() [4/8]

TiledArray::BipartitePermutation::BipartitePermutation ( const Permutation p,
index_type  second_partition_size = 0 
)
inline

Definition at line 679 of file permutation.h.

◆ BipartitePermutation() [5/8]

TiledArray::BipartitePermutation::BipartitePermutation ( const Permutation first,
const Permutation second 
)
inline

Definition at line 685 of file permutation.h.

Here is the call graph for this function:

◆ BipartitePermutation() [6/8]

template<typename InIter , typename std::enable_if< detail::is_input_iterator< InIter >::value >::type * = nullptr>
TiledArray::BipartitePermutation::BipartitePermutation ( InIter  first,
InIter  last,
index_type  second_partition_size = 0 
)
inline

Construct permutation from a range [first,last)

Template Parameters
InIterAn input iterator type
Parameters
firstThe beginning of the iterator range
lastThe end of the iterator range
second_partition_sizethe size of the second partition; the size of the first is then std::distance(first,last)-second_partition_size
Exceptions
TiledArray::ExceptionIf the permutation contains any element that is greater than the size of the permutation or if there are any duplicate elements.

Definition at line 708 of file permutation.h.

◆ BipartitePermutation() [7/8]

template<typename Index , typename = std::enable_if_t<detail::is_integral_range_v<Index>>>
TiledArray::BipartitePermutation::BipartitePermutation ( const Index &  a,
index_type  second_partition_size = 0 
)
inlineexplicit

Array constructor.

Construct permutation from an Array

Parameters
aThe permutation array to be moved
second_partition_sizethe size of the second partition; the size of the first is then std::distance(first,last)-second_partition_size

Definition at line 723 of file permutation.h.

◆ BipartitePermutation() [8/8]

TiledArray::BipartitePermutation::BipartitePermutation ( vector< index_type > &&  a,
index_type  second_partition_size = 0 
)
inlineexplicit

std::vector move constructor

Move the content of the vector into this permutation

Parameters
aThe permutation array to be moved
second_partition_sizethe size of the second partition; the size of the first is then std::distance(first,last)-second_partition_size

Definition at line 735 of file permutation.h.

Member Function Documentation

◆ begin()

auto TiledArray::BipartitePermutation::begin ( ) const
inline

Begin element iterator factory function.

Returns
An iterator that points to the beginning of the element range

Definition at line 643 of file permutation.h.

Here is the call graph for this function:

◆ cbegin()

auto TiledArray::BipartitePermutation::cbegin ( ) const
inline

Begin element iterator factory function.

Returns
An iterator that points to the beginning of the element range

Definition at line 648 of file permutation.h.

Here is the call graph for this function:

◆ cend()

auto TiledArray::BipartitePermutation::cend ( ) const
inline

End element iterator factory function.

Returns
An iterator that points to the end of the element range

Definition at line 658 of file permutation.h.

Here is the call graph for this function:

◆ dim()

auto TiledArray::BipartitePermutation::dim ( ) const
inline

Domain size accessor.

Returns
The domain size

Definition at line 636 of file permutation.h.

Here is the call graph for this function:

◆ end()

auto TiledArray::BipartitePermutation::end ( ) const
inline

End element iterator factory function.

Returns
An iterator that points to the end of the element range

Definition at line 653 of file permutation.h.

Here is the call graph for this function:

◆ first()

const Permutation& TiledArray::BipartitePermutation::first ( ) const
inline
Returns
reference to the first partition

Definition at line 742 of file permutation.h.

Here is the caller graph for this function:

◆ first_size()

index_type TiledArray::BipartitePermutation::first_size ( ) const
inline
Returns
the size of the first partition

Definition at line 747 of file permutation.h.

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

◆ operator bool()

TiledArray::BipartitePermutation::operator bool ( ) const
inlineexplicit

Bool conversion.

Returns
true if the permutation is not empty, otherwise false.

Definition at line 626 of file permutation.h.

◆ operator const Permutation &()

TiledArray::BipartitePermutation::operator const Permutation & ( ) const &
inline

conversion to a plain Permutation is possible if the second partition is empty

Definition at line 674 of file permutation.h.

◆ operator Permutation &()

TiledArray::BipartitePermutation::operator Permutation & ( ) &
inline

conversion to a plain Permutation is possible if the second partition is empty

Definition at line 662 of file permutation.h.

◆ operator Permutation &&()

TiledArray::BipartitePermutation::operator Permutation && ( ) &&
inline

conversion to a plain Permutation is possible if the second partition is empty

Definition at line 668 of file permutation.h.

◆ operator=() [1/2]

BipartitePermutation& TiledArray::BipartitePermutation::operator= ( BipartitePermutation &&  other)
default

◆ operator=() [2/2]

BipartitePermutation& TiledArray::BipartitePermutation::operator= ( const BipartitePermutation )
default

◆ second()

const Permutation& TiledArray::BipartitePermutation::second ( ) const
inline
Returns
reference to the second partition

Definition at line 744 of file permutation.h.

Here is the caller graph for this function:

◆ second_size()

index_type TiledArray::BipartitePermutation::second_size ( ) const
inline
Returns
the size of the second partition

Definition at line 750 of file permutation.h.

Here is the caller graph for this function:

◆ serialize()

template<typename Archive >
void TiledArray::BipartitePermutation::serialize ( Archive &  ar)
inline

Serialize permutation.

MADNESS compatible serialization function

Template Parameters
ArchiveThe serialization archive type
Parameters
[in,out]arThe serialization archive

Definition at line 758 of file permutation.h.

◆ size()

auto TiledArray::BipartitePermutation::size ( ) const
inline

Domain size accessor.

Returns
The domain size

Definition at line 631 of file permutation.h.

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

Friends And Related Function Documentation

◆ operator==

bool operator== ( const BipartitePermutation p1,
const BipartitePermutation p2 
)
friend

Permutation equality operator.

Parameters
p1The left-hand permutation to be compared
p2The right-hand permutation to be compared
Returns
true if all elements of p1 and p2 are equal and the partition sizes match, otherwise false.

Definition at line 795 of file permutation.h.


The documentation for this class was generated from the following file: