1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/R6Classes_H5S.R
\docType{class}
\name{H5S-class}
\alias{H5S-class}
\alias{H5S}
\title{Class for representing HDF5 spaces}
\value{
Object of class \code{\link{H5S}}.
}
\description{
This class represents \code{Spaces} in HDF5. These are mostly useful to define the
dimensions of a dataset as well as the maximum dimensions to which it can grow. By default, the
maximum dimension is equal to the initial dimension. If you want the array to be able to grow arbitrarily
large in one dimension, set the maximum dimension for this index to \code{Inf}. See the examples below
for code how to do this.
}
\section{Methods}{
\describe{
\item{\code{new(type = c("simple", "scalar", "null"), dims = NULL,
maxdims = dims, decode_buf = NULL, id = NULL)}}{
Create a new HDF5-space. This can be done by either specifying a space with appropriate dimensions or by
decoding a character string that represents an encoded space
\strong{Parameters}
\describe{
\item{type}{Either a \code{simple} space, for which \code{dims} and \code{maxdims} have to be given
or a \code{scalar} or \code{null} space. See the HDF5 user guide on spaces to explain the differences.}
\item{dims}{The dimension of the space in case it is of type \code{simple}}
\item{maxdims}{The maximal dimensions of the space}
\item{decode_buf}{The character string that holds the encoded representation of a space}
\item{id}{An existing HDF5 id; internal use only}
}}
\item{\code{copy()}}{
This function implements the HDF5-API function H5Scopy. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_COPY} for details.}
\item{\code{encode()}}{
This function implements the HDF5-API function H5Sencode. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_ENCODE} for details.}
\item{\code{is_simple()}}{
This function implements the HDF5-API function H5Sis_simple. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_IS_SIMPLE} for details.}
\item{\code{get_simple_extent_ndims()}}{
This function implements the HDF5-API function H5Sget_simple_extent_ndims. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SIMPLE_EXTENT_NDIMS} for details.}
\item{\code{offset_simple(offset)}}{
This function implements the HDF5-API function H5Soffset_simple. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_OFFSET_SIMPLE} for details.}
\item{\code{get_simple_extent_dims()}}{
This function implements the HDF5-API function H5Sget_simple_extent_dims. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SIMPLE_EXTENT_DIMS} for details.}
\item{\code{get_simple_extent_npoints()}}{
This function implements the HDF5-API function H5Sget_simple_extent_npoints. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SIMPLE_EXTENT_NPOINTS} for details.}
\item{\code{get_simple_extent_type()}}{
This function implements the HDF5-API function H5Sget_simple_extent_type. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SIMPLE_EXTENT_TYPE} for details.}
\item{\code{extent_copy(h5s_source)}}{
This function implements the HDF5-API function H5Sextent_copy. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_EXTENT_COPY} for details.}
\item{\code{extent_equal(h5s_cmp)}}{
This function implements the HDF5-API function H5Sextent_equal. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_EXTENT_EQUAL} for details.}
\item{\code{set_extent_simple(dims, maxdims)}}{
This function implements the HDF5-API function H5Sset_extent_simple. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_SET_EXTENT_SIMPLE} for details.}
\item{\code{set_extent_none()}}{
This function implements the HDF5-API function H5Sset_extent_none. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_SET_EXTENT_NONE} for details.}
\item{\code{get_select_type()}}{
This function implements the HDF5-API function H5Sget_select_type. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SELECT_TYPE} for details.}
\item{\code{get_select_npoints()}}{
This function implements the HDF5-API function H5Sget_select_npoints. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SELECT_NPOINTS} for details.}
\item{\code{get_select_hyper_nblocks()}}{
This function implements the HDF5-API function H5Sget_select_hyper_nblocks. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SELECT_HYPER_NBLOCKS} for details.}
\item{\code{get_select_hyper_blocklist(startblock = 0,
numblocks = (self$get_select_hyper_nblocks() - startblock))}}{
This function implements the HDF5-API function H5Sget_select_hyper_blocklist. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SELECT_HYPER_BLOCKLIST} for details.}
\item{\code{get_select_elem_npoints()}}{
This function implements the HDF5-API function H5Sget_select_elem_npoints. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SELECT_ELEM_NPOINTS} for details.}
\item{\code{get_select_elem_pointlist(startpoint = 0,
numpoints = (self$get_select_elem_npoints() - startpoint))}}{
This function implements the HDF5-API function H5Sget_select_elem_pointlist. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SELECT_ELEM_POINTLIST} for details.}
\item{\code{get_select_bounds()}}{
This function implements the HDF5-API function H5Sget_select_bounds. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SELECT_BOUNDS} for details.}
\item{\code{select_all()}}{
This function implements the HDF5-API function H5Sselect_all. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_ALL} for details.}
\item{\code{select_none()}}{
This function implements the HDF5-API function H5Sselect_none. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_NONE} for details.}
\item{\code{select_valid()}}{
This function implements the HDF5-API function H5Sselect_valid. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_VALID} for details.}
\item{\code{select_elements(coord, op = h5const$H5S_SELECT_SET, byrow = TRUE)}}{
This function implements the HDF5-API function H5Sselect_elements. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_ELEMENTS} for details.}
\item{\code{select_hyperslab(start, count, stride = NULL, block = NULL,
op = h5const$H5S_SELECT_SET)}}{
This function implements the HDF5-API function H5Sselect_hyperslab. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_HYPERSLAB} for details.}
\item{\code{subset(args, op = h5const$H5S_SELECT_SET, envir = parent.frame())}}{
Subsetting the space. This is mainly intended as a helper function for the '[' function, but
can also be used on its own.
\strong{Parameters}
\describe{
\item{args}{The indices for each dimension to subset given as a list. This makes this easier to use as a programmatic API.
For interactive use we recommend the use of the \code{[} operator.}
\item{op}{The operator to use. Same as for the other HDF5 space selection functions. One of the elements shown in
\code{h5const$H5S_seloper_t}}
\item{envir}{The environment in which to evaluate \code{args}}
}}
\item{\code{print(...)}}{
Prints information for the group
\strong{Parameters}
\describe{
\item{...}{ignored}
}}
\item{\code{dims()}}{
Get the dimensions of the space. Return NULL if the space is not simple (i.e. NULL-space) or a length-0 integer if it is a scalar}
\item{\code{maxdims()}}{
Get the maximal dimensions of the space.Return NULL if the space is not simple (i.e. NULL-space) or a length-0 integer if it is a scalar}
\item{\code{rank()}}{
This function implements the HDF5-API function H5Sget_simple_extent_ndims. Please see the documentation at \url{https://portal.hdfgroup.org/display/HDF5/H5S_GET_SIMPLE_EXTENT_NDIMS} for details.}
}}
\examples{
h5s_fixed <- H5S$new("simple", dims=c(5, 2))
h5s_fixed
h5s_variable <- H5S$new("simple", dims=c(5,2), maxdims=c(Inf,2))
h5s_variable
h5s_variable$set_extent_simple(c(10,2), c(Inf, 2))
h5s_variable
# now select a subset of points
# argument evaluation has a heuristic; here it chooses point selection
h5s_variable[c(1, 3, 8), 1]
h5s_variable$get_select_type()
h5s_variable$get_select_elem_pointlist()
# and a hyperslab (chosen by the argument heuristic)
h5s_variable[2:7, 1:2]
h5s_variable$get_select_type()
h5s_variable$get_select_hyper_blocklist()
}
\author{
Holger Hoefling
}
|