MPQC  3.0.0-alpha
sc::sma2::BlockInfo< N > Class Template Reference

BlockInfo stores info about a block of data. More...

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

Public Member Functions

 BlockInfo (const std::vector< bi_t > &v)
 Initialize the blocks to the values in the argument, v. More...
 
 BlockInfo (const BlockInfo< N > &b, const IndexList &l)
 Initialize the blocks to the values in the argument, b. More...
 
template<int NB>
 BlockInfo (const IndexList &l, const BlockInfo< NB > &b, const IndexList &lb)
 
void zero ()
 Set all block indices to zero.
 
bi_t & block (int i)
 
const bi_t & block (int i) const
 
unsigned int size (const Range *indices) const
 Compute the size of this block.
 
unsigned int subset_size (const Range *indices, const IndexList &indexlist) const
 Compute the size of a block formed from this block by using some subset of the indices given by indexlist.
 
template<int N2>
void assign_blocks (const IndexList &il, const BlockInfo< N2 > &bi2, const IndexList &il2)
 Assign blocks to those in another BlockInfo, bi2, given an IndexList that specifies the index mapping into this BlockInfo, il, and another IndexList that gives the index mapping into the other BlockInfo, il2.
 
template<int N2>
void assign_blocks (const IndexList &il, const BlockInfo< N2 > &bi2)
 Assign blocks to those in another BlockInfo, bi2, given an IndexList that specifies the index mapping into this BlockInfo, il.
 
template<int N2>
bool equiv_blocks (const IndexList &il, const BlockInfo< N2 > &bi2)
 Return true if blocks are the same as in another BlockInfo, bi2, given an IndexList that specifies the index mapping into this BlockInfo, il.
 
void print (std::ostream &o=sc::ExEnv::outn()) const
 
void print_block_sizes (const Range *indices, std::ostream &o=sc::ExEnv::outn()) const
 
void write (sc::StateOut &so) const
 
void read (sc::StateIn &si)
 

Detailed Description

template<int N>
class sc::sma2::BlockInfo< N >

BlockInfo stores info about a block of data.

This info includes the block numbers for each index.

Constructor & Destructor Documentation

◆ BlockInfo() [1/2]

template<int N>
sc::sma2::BlockInfo< N >::BlockInfo ( const std::vector< bi_t > &  v)
inline

Initialize the blocks to the values in the argument, v.

The number of blocks assigned is the smaller of N and v.size().

◆ BlockInfo() [2/2]

template<int N>
sc::sma2::BlockInfo< N >::BlockInfo ( const BlockInfo< N > &  b,
const IndexList l 
)
inline

Initialize the blocks to the values in the argument, b.

The IndexList, l, specifies the order used to extract the indices from b.


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

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