Global

Methods

load(path, name) → {Promise.<external:ScranMatrix>}

Source:

Load a delayed matrix from a chihaya-formatted HDF5 file into a ScranMatrix object.

Parameters:
Name Type Description
path string

Path to the file. On browsers, this file should be present on the virtual file system, see writeFile.

name string

Name of the group representing the delayed matrix.

Returns:

Promise resolving to a ScranMatrix containing the delayed matrix.

Type
Promise.<external:ScranMatrix>

loadHandle(path) → {Promise.<external:ScranMatrix>}

Source:

Load a delayed matrix from a HDF5 handle into a ScranMatrix object. This can be used by developers to load delayed array seeds in handlers for custom operations.

Parameters:
Name Type Description
path external:H5Group

Handle to a HDF5 group.

Returns:

Promise resolving to a ScranMatrix containing the delayed matrix.

Type
Promise.<external:ScranMatrix>

registerArrayHandler(array, handlernullable) → (nullable) {function}

Source:

Get or set custom handlers for arrays in a chihaya-formatted HDF5 file.

Parameters:
Name Type Attributes Description
array string

Type of the delayed array, matched against the delayed_array attribute.

handler function <nullable>

Handler function that accepts a HDF5 group handle (corresponding to the array) and returns a ScranMatrix object. Handlers may be async. If null, any custom handler was previously registered will be removed.

Returns:

The previously registered handler function, or null if no handler was previously registered.

Type
function

registerOperationHandler(operation, handlernullable) → (nullable) {function}

Source:

Get or set custom handlers for delayed operations in a chihaya-formatted HDF5 file.

Parameters:
Name Type Attributes Description
operation string

Type of the delayed operation, matched against the delayed_operation attribute.

handler function <nullable>

Handler function that accepts a HDF5 group handle (corresponding to the delayed operation) and returns a ScranMatrix object. Handlers may be async. If null, any custom handler was previously registered will be removed.

Returns:

The previously registered handler function, or null if no handler was previously registered.

Type
function

sparseLayered(layeredopt, nullable)

Source:

Should sparse matrices be loaded in layered format? This sacrifices some access speed for improved memory efficiency - see here for details.

Parameters:
Name Type Attributes Default Description
layered boolean <optional>
<nullable>
null

Whether to load a sparse matrix in layered format. If null, the existing value of this flag is returned without any change.

Returns:

If layered = null, the existing value of this flag is directly returned.

Otherwise, the flag is set to layered and the previous value of the flag is returned.