MPQC  3.0.0-alpha
sc::sma2::Range Class Reference

An Range represent a set of integers, [0, N). More...

#include <chemistry/qc/lmp2/sma.h>

Public Types

enum  BlockingMethod { AtomBlocking, ShellBlocking, FunctionBlocking, ExtentBlocking }
 

Public Member Functions

 Range (const sc::Ref< sc::GaussianBasisSet > &, BlockingMethod b=ShellBlocking, int blocksize=1)
 
 Range (int nindex, int block_size)
 
 Range (const std::vector< int > &block_size)
 
void init (const sc::Ref< sc::GaussianBasisSet > &, BlockingMethod b=ShellBlocking, int blocksize=1)
 
void init (int nindex, int block_size)
 
void clear ()
 
int nindex () const
 Returns the dimension of this range.
 
int nblock () const
 Returns the number of blocks.
 
int block_size (int i) const
 Returns the size for the given block.
 
int max_block_size () const
 Returns the maximum block size.
 
int block_offset (int i) const
 Returns the offset for the given block.
 
int index_to_block (int i) const
 Given an index, return the block in which that index is found.
 
int index_to_offset (int i) const
 Given an index, return its offset within the block in which that index is found.
 
int basis_index_to_range_index (int i) const
 Maps a basis function number to the number within this Range object. More...
 
int range_index_to_basis_index (int i) const
 
bool operator== (const Range &r) const
 
bool operator!= (const Range &r) const
 
bool all_size_one () const
 Returns true if all blocks are size 1.
 
void print (std::ostream &o=sc::ExEnv::out0()) const
 
void write (sc::StateOut &) const
 
void read (sc::StateIn &)
 

Detailed Description

An Range represent a set of integers, [0, N).

For example, one Range could represent the atomic orbitals and another could represent the molecular orbitals. An index is divided into user defined blocks.

Member Function Documentation

◆ basis_index_to_range_index()

int sc::sma2::Range::basis_index_to_range_index ( int  i) const

Maps a basis function number to the number within this Range object.

This arises since ExtentBlocking must reorder shells to group shells with similar extents in the same block.


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

Generated at Sun Jan 26 2020 23:24:15 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.