MADNESS 0.10.1
Public Member Functions | Private Attributes | List of all members
madness::LatticeRange Class Reference

Denotes lattice summation over range [-N, N]; N=0 is equivalent to including the simulation cell only. More...

#include <kernelrange.h>

Public Member Functions

 LatticeRange ()=default
 constructs [0,0]
 
 LatticeRange (bool lattice_sum)
 
 LatticeRange (int n)
 constructs [-n,n]
 
int get_range () const
 
bool infinite () const
 
 operator bool () const
 
LatticeRangeset_infinite ()
 
LatticeRangeset_range (int n)
 

Private Attributes

int N = 0
 lattice sum over [-N, N]; total # of cells = 2N + 1
 

Detailed Description

Denotes lattice summation over range [-N, N]; N=0 is equivalent to including the simulation cell only.

Constructor & Destructor Documentation

◆ LatticeRange() [1/3]

madness::LatticeRange::LatticeRange ( )
default

constructs [0,0]

◆ LatticeRange() [2/3]

madness::LatticeRange::LatticeRange ( int  n)
inlineexplicit

constructs [-n,n]

References set_range().

◆ LatticeRange() [3/3]

madness::LatticeRange::LatticeRange ( bool  lattice_sum)
inlineexplicit
Parameters
lattice_sumif true, constructs [-∞,∞], else constructs [0,0]

References madness::lattice_sum(), and set_infinite().

Member Function Documentation

◆ get_range()

int madness::LatticeRange::get_range ( ) const
inline
Returns
the lattice summation range in each direction

References N.

◆ infinite()

bool madness::LatticeRange::infinite ( ) const
inline
Returns
true if this is [-∞,∞]

References N.

◆ operator bool()

madness::LatticeRange::operator bool ( ) const
inlineexplicit
Returns
true if N > 0

References N.

◆ set_infinite()

LatticeRange & madness::LatticeRange::set_infinite ( )
inline

sets this to [-∞,∞]

Returns
reference to this

References N.

Referenced by LatticeRange().

◆ set_range()

LatticeRange & madness::LatticeRange::set_range ( int  n)
inline
Parameters
nthe lattice summation range in each direction
Returns
reference to this

References MADNESS_ASSERT.

Referenced by LatticeRange().

Member Data Documentation

◆ N

int madness::LatticeRange::N = 0
private

lattice sum over [-N, N]; total # of cells = 2N + 1

Referenced by get_range(), infinite(), operator bool(), and set_infinite().


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