Skip to content

Commit

Permalink
Added images to the dataspace documentation
Browse files Browse the repository at this point in the history
Update #110
  • Loading branch information
eugenwintersberger committed Nov 2, 2017
1 parent 14aa862 commit 38f21ea
Show file tree
Hide file tree
Showing 5 changed files with 319 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/source/images/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ set(IMAGES attribute_manager_uml.png
hdf5_node_types.svg
hdf5_dataspaces.svg
hdf5_selections.svg
static_dataspace.svg
dynamic_dataspace_bounded.svg
dynamic_dataspace_unbounded.svg
)

add_sphinx_source(${IMAGES})
Expand Down
99 changes: 99 additions & 0 deletions doc/source/images/dynamic_dataspace_bounded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 117 additions & 0 deletions doc/source/images/dynamic_dataspace_unbounded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions doc/source/images/static_dataspace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions doc/source/users_guide/dataspace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,25 @@ To create a simple dataspace with fixed dimensions use
Dimensions current = space.current_dimensions(); // {2,3}
Dimensions maximum = space.maximum_dimensions(); // {2,3} too
.. figure:: ../images/static_dataspace.svg
:align: center
:width: 20%

which will result in a dataspace of rank 2 with 6 elements. To build an
extensible dataspace with fixed bounds we could use

.. code-block:: cpp
using namespace hdf5;
dataspace::Simple space({2,3},{10,100});
dataspace::Simple space({2,3},{10,10});
space.current_dimensions(); // {2,3}
space.maximum_dimensions(); // {10,100}
space.maximum_dimensions(); // {10,10}
.. figure:: ../images/dynamic_dataspace_bounded.svg
:align: center
:width: 40%

Finally, for an extensible dataspace with an unlimited number of elements
along a dimension we could use
Expand All @@ -127,6 +135,10 @@ along a dimension we could use
dataspace::Simple space({1},{dataspace::Simple::UNLIMITED});
.. figure:: ../images/dynamic_dataspace_unbounded.svg
:align: center
:width: 30%

The initial size of the dataspace would be 1. However, we could extend it
as much as we want (basically can). We will see later how to use this feature
along with datasets.
Expand Down

0 comments on commit 38f21ea

Please sign in to comment.