h5cpp  0.6
A modern C++ wrapper for the HDF5 C library
hdf5::dataspace::Points Class Reference

point selection implementation

#include <points.hpp>

Inheritance diagram for hdf5::dataspace::Points:
Collaboration diagram for hdf5::dataspace::Points:

Public Member Functions

 Points ()=default
 default constructor More...
 
 ~Points () override=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...
 
virtual size_t size () const override
 get the selection size More...
 
virtual SelectionType type () const override
 get the selection type More...
 
virtual Dimensions dimensions () const override
 get current dimensions 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 ( )
overridedefault

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.

◆ dimensions()

virtual Dimensions hdf5::dataspace::Points::dimensions ( ) const
overridevirtual

Get a number of elements along each dimension a selection spans this is particularly useful in the case of a Hyperslab

Exceptions
std::runtime_errorin case of a failure
Returns
the selection dimentsions

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.

◆ size()

virtual size_t hdf5::dataspace::Points::size ( ) const
overridevirtual

Get the total number of elements adressed by an individual selection

Exceptions
std::runtime_errorin case of a failure
Returns
the selection type enumerator

Implements hdf5::dataspace::Selection.

◆ type()

virtual SelectionType hdf5::dataspace::Points::type ( ) const
overridevirtual

Get the type of the selection

Returns
the selection type enumerator

Implements hdf5::dataspace::Selection.


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