Skip to main content

write

Method of HDF5File.

Overloads

NameDescription
write(const string path, const List values, as_real type) -> HDF5FileWrites a real list dataset.
write(const string path, const integer value) -> HDF5FileWrites a scalar dataset and returns the file for chaining.
write(const string path, const real value) -> HDF5FileWrites a scalar dataset and returns the file for chaining.
write(const string path, const bool value) -> HDF5FileWrites a scalar dataset and returns the file for chaining.
write(const string path, const RealTensor values) -> HDF5FileWrites a tensor dataset and returns the file for chaining.
write(const string path, const ComplexTensor values) -> HDF5FileWrites a tensor dataset and returns the file for chaining.
write(const string path, const complex value) -> HDF5FileWrites a scalar dataset and returns the file for chaining.
write(const string path, const List values, as_string type) -> HDF5FileWrites a string list dataset.
write(const string path, const List values, as_complex type) -> HDF5FileWrites a complex list dataset.
write(const string path, const List values, as_integer type) -> HDF5FileWrites a integer list dataset.
write(const string path, const List values, as_bool type) -> HDF5FileWrites a bool list dataset.
write(const string path, const string value) -> HDF5FileWrites a scalar dataset and returns the file for chaining.
write(const string path, const RealMatrix values) -> HDF5FileWrites a matrix dataset and returns the file for chaining.
write(const string path, const ComplexMatrix values) -> HDF5FileWrites a matrix dataset and returns the file for chaining.
write(const string path, const IntegerArray values) -> HDF5FileWrites an array dataset and returns the file for chaining.
write(const string path, const RealArray values) -> HDF5FileWrites an array dataset and returns the file for chaining.
write(const string path, const BoolArray values) -> HDF5FileWrites an array dataset and returns the file for chaining.
write(const string path, const ComplexArray values) -> HDF5FileWrites an array dataset and returns the file for chaining.
write(const string path, const List values) -> HDF5FileWrites a list dataset and returns the file for chaining.
write(const string path, const RealSparseMatrix values) -> HDF5FileWrites a sparse matrix dataset and returns the file for chaining.
write(const string path, const ComplexSparseMatrix values) -> HDF5FileWrites a sparse matrix dataset and returns the file for chaining.

write(const string path, const List values, as_real type) -> HDF5File

Writes a real list dataset.

Parameters

  • path: Dataset path.
  • values: List of primitive values.
  • type: Type tag (as_real).

Returns

Reference to the same HDF5File instance.

write(const string path, const integer value) -> HDF5File

Writes a scalar dataset and returns the file for chaining.

Parameters

  • path: Dataset path.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write("/scalars/answer", 42)

write(const string path, const real value) -> HDF5File

Writes a scalar dataset and returns the file for chaining.

Parameters

  • path: Dataset path.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write("/scalars/answer", 42)

write(const string path, const bool value) -> HDF5File

Writes a scalar dataset and returns the file for chaining.

Parameters

  • path: Dataset path.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write("/scalars/answer", 42)

write(const string path, const RealTensor values) -> HDF5File

Writes a tensor dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const ComplexTensor values) -> HDF5File

Writes a tensor dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const complex value) -> HDF5File

Writes a scalar dataset and returns the file for chaining.

Parameters

  • path: Dataset path.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write("/scalars/answer", 42)

write(const string path, const List values, as_string type) -> HDF5File

Writes a string list dataset.

Parameters

  • path: Dataset path.
  • values: List of primitive values.
  • type: Type tag (as_string).

Returns

Reference to the same HDF5File instance.

write(const string path, const List values, as_complex type) -> HDF5File

Writes a complex list dataset.

Parameters

  • path: Dataset path.
  • values: List of primitive values.
  • type: Type tag (as_complex).

Returns

Reference to the same HDF5File instance.

write(const string path, const List values, as_integer type) -> HDF5File

Writes a integer list dataset.

Parameters

  • path: Dataset path.
  • values: List of primitive values.
  • type: Type tag (as_integer).

Returns

Reference to the same HDF5File instance.

write(const string path, const List values, as_bool type) -> HDF5File

Writes a bool list dataset.

Parameters

  • path: Dataset path.
  • values: List of primitive values.
  • type: Type tag (as_bool).

Returns

Reference to the same HDF5File instance.

write(const string path, const string value) -> HDF5File

Writes a scalar dataset and returns the file for chaining.

Parameters

  • path: Dataset path.
  • value: Scalar value to write.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write("/scalars/answer", 42)

write(const string path, const RealMatrix values) -> HDF5File

Writes a matrix dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const ComplexMatrix values) -> HDF5File

Writes a matrix dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const IntegerArray values) -> HDF5File

Writes an array dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const RealArray values) -> HDF5File

Writes an array dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const BoolArray values) -> HDF5File

Writes an array dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const ComplexArray values) -> HDF5File

Writes an array dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const List values) -> HDF5File

Writes a list dataset and returns the file for chaining.

Parameters

  • path: Dataset path.
  • values: List of primitive values.

Returns

Reference to the same HDF5File instance.

Example

var f = HDF5File("data.h5", "w")
f.write("/list/values", [1, 2, 3, 4])

write(const string path, const RealSparseMatrix values) -> HDF5File

Writes a sparse matrix dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.

write(const string path, const ComplexSparseMatrix values) -> HDF5File

Writes a sparse matrix dataset and returns the file for chaining.

Parameters

Returns

Reference to the same HDF5File instance.