On this page

# DataSet

A DataSet is an object with width/height and an array of numbers of length = width * height.

The array can be a TypedArray or a JavaScript Array.

## Constructor

### new DataSet(width, height, data)

Creates an instance of DataSet. Checks data is right size, throws an error if not.

Parameters:

Name | Type | Description
--- | --- | ---
`width` | number | The integer width of the array
`height` | number | The integer height of the array
`data` | Array | The array of numbers of length width * height

Source
  - DataSet.js, line 10

## Methods

### (static) emptyDataSet(width, height, Type) → {DataSet}

Factory method returning an empty dataset of given width, height, dataType

Parameters:

Name | Type | Description
--- | --- | ---
`width` | number | The integer width of the array
`height` | number | The integer height of the array
`Type` | Object | Array (default) or one of the typed array types

Source
  - DataSet.js, line 26

Returns:

The resulting DataSet with no values assigned

Type:
  DataSet

Type anything to view search result