h5cpp  0.3.3
A modern C++ wrapper for the HDF5 C library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
hdf5::dataspace::Points Class Reference

point selection implementation

#include <points.hpp>

Inheritance diagram for hdf5::dataspace::Points:
Inheritance graph
[legend]
Collaboration diagram for hdf5::dataspace::Points:
Collaboration graph
[legend]

Public Member Functions

 Points ()=default
 default constructor More...
 
 ~Points ()=default
 destructor More...
 
 Points (size_t rank)
 constructor More...
 
 Points (const std::vector< std::vector< hsize_t >> &coord_set)
 constructor More...
 
size_t rank () const
 get the number of dimensions More...
 
size_t points () const
 get the number of points in the selection More...
 
void add (const std::vector< hsize_t > &coords)
 add a new point to the selection More...
 
void add_set (const std::vector< std::vector< hsize_t >> &coord_set)
 add point set to the selection More...
 
void apply (const Dataspace &space, SelectionOperation ops) const override
 apply the selection to a dataspace More...
 
- Public Member Functions inherited from hdf5::dataspace::Selection
 Selection ()=default
 default constructor More...
 
 Selection (const Selection &)=default
 copy constructor More...
 
virtual ~Selection ()
 destructor More...
 

Additional Inherited Members

- Public Types inherited from hdf5::dataspace::Selection
using UniquePointer = std::unique_ptr< Selection >
 pointer for selection stacks More...
 
using SharedPointer = std::shared_ptr< Selection >
 

Constructor & Destructor Documentation

◆ Points() [1/3]

hdf5::dataspace::Points::Points ( )
default

We use the compiler provided default implementation.

◆ ~Points()

hdf5::dataspace::Points::~Points ( )
default

Use the compiler provided default implementation.

◆ Points() [2/3]

hdf5::dataspace::Points::Points ( size_t  rank)
explicit

Create a new point selection or a given rank

Parameters
rankthe number of dimensions of the selection

◆ Points() [3/3]

hdf5::dataspace::Points::Points ( const std::vector< std::vector< hsize_t >> &  coord_set)
explicit

Create a point selection from a set of selection coordinates. The number of dimensions of the first coordinates determines the rank of the selection.

Parameters
coord_setset of selection coordinates

Member Function Documentation

◆ add()

void hdf5::dataspace::Points::add ( const std::vector< hsize_t > &  coords)
Parameters
coordsindex coordinates of the point
Exceptions
runtime_errorin the case of a failure

◆ add_set()

void hdf5::dataspace::Points::add_set ( const std::vector< std::vector< hsize_t >> &  coord_set)
Parameters
coord_setcoordinate set
Exceptions
runtime_errorin the case of a failure

◆ apply()

void hdf5::dataspace::Points::apply ( const Dataspace space,
SelectionOperation  ops 
) const
overridevirtual
Parameters
spacereference to the dataspace onto which the selection should be applied
opsopertion used to apply the selection

Implements hdf5::dataspace::Selection.

◆ points()

size_t hdf5::dataspace::Points::points ( ) const
Returns
number of points as unsigned integer

◆ rank()

size_t hdf5::dataspace::Points::rank ( ) const
Returns
number of dimensions of the selection.

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