Gromacs  2025-dev-20240717-76b059a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::RangePartitioning Class Reference

#include <gromacs/topology/block.h>

Description

Division of a range of indices into consecutive blocks.

A range of consecutive indices 0 to full.range.end() is divided into numBlocks() consecutive blocks of consecutive indices. Block b contains indices i for which block(b).begin() <= i < block(b).end().

Public Types

using Block = Range< int >
 A block defined by a range of atom indices.
 

Public Member Functions

int numBlocks () const
 Returns the number of blocks.
 
Block block (int blockIndex) const
 Returns the size of the block with index blockIndex.
 
Block fullRange () const
 Returns the full range.
 
void appendBlock (int blockSize)
 Appends a block of size blockSize at the end of the range. More...
 
void clear ()
 Removes all blocks.
 

Member Function Documentation

void gmx::RangePartitioning::appendBlock ( int  blockSize)
inline

Appends a block of size blockSize at the end of the range.

Note
blocksize has to be >= 1

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