MPQC
3.0.0-alpha
|
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) |
BlockInfo stores info about a block of data.
This info includes the block numbers for each index.
|
inline |
Initialize the blocks to the values in the argument, v.
The number of blocks assigned is the smaller of N and v.size().
|
inline |
Initialize the blocks to the values in the argument, b.
The IndexList, l, specifies the order used to extract the indices from b.