ILNumerics Ultimate VS

H5StringDatasetSet Method (BaseArrayString, BaseArray)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Alter the existing data stored in the file or parts of it.

[ILNumerics HDF5 Module]

Namespace:  ILNumerics.IO.HDF5
Assembly:  ILNumerics.IO.HDF5 (in ILNumerics.IO.HDF5.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public void Set(
	BaseArray<string> A,
	params BaseArray[] range
)

Parameters

A
Type: ILNumericsBaseArrayString
Data to overwrite the existing element values with.
range
Type: ILNumericsBaseArray
[optional] Definition of the area in the existing data to overwrite. A good subset of the full ILNumerics subarray feature set is allowed.
Remarks

If the optional argument range is omitted, A will replace the whole existing data and the size of the existing array is adjusted to match the size of A.

While the rank of range (i.e. the number of dimensions addressed by range) must match the rank of the array stored, the size of A does not need to have the same rank. However, the number of elements addressed by range must be lower than or equal to the number of elements stored in A. If A contains more elements than addresseb by range, subsequent elements in A will be ignored.

If range fully or partly addresses an area of the dataset which lays outside of the current dimension size(s) of the dataset, the dataset will be expanded just as much that A can be stored in the addressed region. The length of dimensions not affected by the expansion will stay untouched.

If range is given, it is used to describe that part of the existing array in the file which will be overwritten with the values in A. The HDF5 hyperslab feature is used for that. Therefore, the range specification must be compatible with the capabilities of the HDF5 hyperslab feature. Otherwise, an ArgumentException is thrown. Consult the ILNumerics HDF5 online manual for all options of valid range specifications.

Note that the requirements on the range parameter are higher than for Get(BaseArray) since using hyperslabs is the only way of dealing with partial writes to HDF datasets here: for Get(BaseArray), if the range was not compatible, we could fetch the complete array and derive the subarray in memory using the full spectrum of ILNumerics subarray features. For [!:Set(InArray<string>, StringPadding, BaseArray[])] one might argue that we could go the same way: fetch the whole array, manipulate in memory and write it back to the dataset. However, this is not easily applicable, since in order to fetch the array, we would need to define a type for its elements. Set, on the other side does not request/provide a type. This limitation might get removed in a future version of ILNumerics.IO.HDF5 by constructing the element type out of the actual type stored in the dataset.

[ILNumerics HDF5 Module]

See Also

Reference

Other Resources