MADNESS 0.10.1
Public Member Functions | Private Attributes | List of all members
madness::ElectronPairIterator Struct Reference

#include <PNOStructures.h>

Public Member Functions

 ElectronPairIterator (const size_t &nocc, const size_t &freeze)
 
bool diagonal () const
 
bool finished () const
 
size_t i () const
 
size_t ij () const
 
size_t j () const
 
std::string name () const
 Gives back "pairij" (for frozen core i and j are the true indices corresponding to the reference with all orbitals)
 
size_t nocc () const
 number of active occupied orbitals
 
size_t npairs () const
 total number of pairs n * (n + 1) / 2;
 
 operator bool () const
 check if iteration has to proceed
 
ElectronPairIteratoroperator++ ()
 pre-increment operator
 
size_t start () const
 
size_t stop () const
 
template<typename Int >
size_t tridx (Int row, Int col)
 Gives the number of the pair in the valarray of pno-mp2.cc file.
 

Private Attributes

bool finished_ =false
 true if all pairs where iterated
 
const size_t freeze_ =0
 number of frozen orbitals (just to print the correct name)
 
size_t i_ =0
 current pair index i
 
size_t ij_ =0
 pair number starting from 00 => 0
 
size_t j_ =0
 current pair index j
 
const size_t start_ =0
 start value for i and j (usually 0)
 
const size_t stop_ =0
 stop value for i and j (usually number of occ orbitals or occ-nfreeze for frozen core)
 

Detailed Description

Iterator over pairs iterates (i,j) from i=start to i<stop and j=i to j<stop iterates like the pno-mp2.cc code For frozen orbitals iteration goes from 0 to nocc-freeze !!! (consistency with pno-mp2.cc code) The name() function gives back the "real" pair number

Constructor & Destructor Documentation

◆ ElectronPairIterator()

madness::ElectronPairIterator::ElectronPairIterator ( const size_t &  nocc,
const size_t &  freeze 
)
inline

References MADNESS_ASSERT, start_, and stop_.

Member Function Documentation

◆ diagonal()

bool madness::ElectronPairIterator::diagonal ( ) const
inline

◆ finished()

bool madness::ElectronPairIterator::finished ( ) const
inline

References finished_.

◆ i()

size_t madness::ElectronPairIterator::i ( ) const
inline

◆ ij()

size_t madness::ElectronPairIterator::ij ( ) const
inline

◆ j()

size_t madness::ElectronPairIterator::j ( ) const
inline

◆ name()

std::string madness::ElectronPairIterator::name ( ) const
inline

Gives back "pairij" (for frozen core i and j are the true indices corresponding to the reference with all orbitals)

References freeze_, i_, j_, and name().

Referenced by name(), and madness::PNOPairs::name().

◆ nocc()

size_t madness::ElectronPairIterator::nocc ( ) const
inline

number of active occupied orbitals

References start_, and stop_.

Referenced by madness::PNO::solve_cispd(), and madness::PNO::solve_mp2().

◆ npairs()

size_t madness::ElectronPairIterator::npairs ( ) const
inline

total number of pairs n * (n + 1) / 2;

References start_, and stop_.

Referenced by madness::PNO::initialize_pairs().

◆ operator bool()

madness::ElectronPairIterator::operator bool ( ) const
inline

check if iteration has to proceed

References finished_.

◆ operator++()

ElectronPairIterator & madness::ElectronPairIterator::operator++ ( )

pre-increment operator

References finished_, i_, ij_, j_, MADNESS_ASSERT, start_, stop_, and tridx().

◆ start()

size_t madness::ElectronPairIterator::start ( ) const
inline

References start_.

◆ stop()

size_t madness::ElectronPairIterator::stop ( ) const
inline

References stop_.

◆ tridx()

template<typename Int >
size_t madness::ElectronPairIterator::tridx ( Int  row,
Int  col 
)
inline

Gives the number of the pair in the valarray of pno-mp2.cc file.

Referenced by madness::PNO::iterate_pairs_internal(), operator++(), madness::PNO::t_solve(), madness::PNO::transform_pairs(), and madness::PNO::update_pno().

Member Data Documentation

◆ finished_

bool madness::ElectronPairIterator::finished_ =false
private

true if all pairs where iterated

Referenced by finished(), operator bool(), and operator++().

◆ freeze_

const size_t madness::ElectronPairIterator::freeze_ =0
private

number of frozen orbitals (just to print the correct name)

Referenced by name().

◆ i_

size_t madness::ElectronPairIterator::i_ =0
private

current pair index i

Referenced by diagonal(), i(), name(), and operator++().

◆ ij_

size_t madness::ElectronPairIterator::ij_ =0
private

pair number starting from 00 => 0

Referenced by ij(), and operator++().

◆ j_

size_t madness::ElectronPairIterator::j_ =0
private

current pair index j

Referenced by diagonal(), j(), name(), and operator++().

◆ start_

const size_t madness::ElectronPairIterator::start_ =0
private

start value for i and j (usually 0)

Referenced by ElectronPairIterator(), nocc(), npairs(), operator++(), and start().

◆ stop_

const size_t madness::ElectronPairIterator::stop_ =0
private

stop value for i and j (usually number of occ orbitals or occ-nfreeze for frozen core)

Referenced by ElectronPairIterator(), nocc(), npairs(), operator++(), and stop().


The documentation for this struct was generated from the following files: