FluidDataSet is a container associating data points with identifiers.
Read more about FluidDataSet on the learn platform.
server |
The Server on which to construct this object |
Add a new point to the FluidDataSet. The dimensionality of the FluidDataSet is governed by the size of the first point added. If the identifier already exists, or if the size of the data does not match the dimensionality of the FluidDataSet an error will be reported.
identifier |
The identifier for the point. |
buffer |
A Buffer containing the data for the point. |
action |
A function to execute when the server has completed running addPoint |
Retrieve a point from the data set into a Buffer. If the identifier does not exist an error will be reported.
identifier |
The identifier for the point to be retrieved. |
buffer |
A Buffer where the retrieved data will be stored. |
action |
A function to execute when the server has completed running getPoint |
Set the point. If the identifier exists, this method behaves like updatePoint. If the identifier doesn't exist, it behaves like addPoint.
identifier |
The identifier for this point. |
buffer |
A Buffer containing the data for the point. |
action |
A function to execute when the server has completed running setPoint |
Update an existing identifier's data. If the identifier does not exist, or if the size of the data does not match the dimensionality of the FluidDataSet an error will be reported.
identifier |
The identifier for this point. |
buffer |
A Buffer containing the data for the point. |
action |
A function to execute when the server has completed running updatePoint |
Remove a point from the data set. If the identifier doesn't exist an error will be reported.
identifier |
The identifier to be deleted. |
action |
A function to execute when the server has completed running deletePoint |
Merge sourceDataSet in the current DataSet. It will replace the value of points with the same identifier if overwrite is set to 1. To add columns instead, see the 'transformJoin' method of FluidDataSetQuery.
sourceDataSet |
The source DataSet to be merged. |
overwrite |
A flag to allow overwrite points with the same identifier. |
action |
A function to execute when the server has completed running merge |
Dump the state of this object as a Dictionary.
action |
A function to execute when the server has completed running dump |
Replace the internal state of the object from a Dictionary.
dict | |
action |
A function to execute when the server has completed running load |
Post an abbreviated content of the DataSet in the window by default, but you can supply a custom action instead.
action |
A function to execute when the server has completed running print |
The number of data points (entries / observations) in this model or dataset / labeset
action |
A function to execute when the server has completed running size |
The number of columns (dimensions) in this model or dataset / labeset
action |
A function to execute when the server has completed running cols |
Empty the data set.
action |
A function to execute when the server has completed running clear |
Save the contents of the object to a JSON file on disk.
filename |
Path of the file to load from |
action |
A function to execute when the server has completed running write |
Replace the internal state of the object from a JSON file on disk.
filename |
Path of the file to load from |
action |
A function to execute when the server has completed running read |
Import to the dataset the content of a Buffer, with optional transposition, and a map of frames/channels to the original IDs as a FluidLabelSet.
buffer |
The buffer to read from. The dataset will be resized. |
transpose |
If 0, each buffer frame becomes a dataset point, and each buffer channel becomes a dataset dimension. If 1, channels become points, and frames become dimensions. |
labelSet |
The FluidLabelSet from which to retrieve the point's IDs associated with their reference frame number (or channel number if transposed). |
action |
A function to execute when the server has completed running fromBuffer |
Dump the content of the dataset to a Buffer, with optional transposition, and a map of frames/channels to the original IDs as a FluidLabelSet.
buffer |
The buffer to write to. It will be resized. |
transpose |
If 0, each dataset point becomes a buffer frame, and each dataset dimension becomes a buffer channel. If 1, points become channels, and dimensions become frames. |
labelSet |
The FluidLabelSet in which to dump the point's IDs associated with their reference frame number (or channel number if transposed). |
action |
A function to execute when the server has completed running toBuffer |
Export the dataset identifier to a FluidLabelSet.
labelSet |
The FluidLabelSet to export to. Its content will be replaced. |
action |
A function to execute when the server has completed running getIds |
Returns the identifiers of the k
points nearest to the one passed. Note that this is a brute force distance measure, and comparatively inefficient for repeated queries against large datasets. For such cases, FluidKDTree will be more efficient.
buffer |
A Buffer containing a data point to match against. The number of frames in the buffer must match the dimensionality of the DataSet. |
k |
The number of nearest neighbours to return. The identifiers will be sorted, beginning with the nearest. |
action |
A function to execute when the server has completed running kNearest |
Adding an audio analysis to a DataSet
Four ways to get a bunch of data into a dataset
More Messages
Merge two data sets that have the same number of dimensions
Using .fromBuffer
Nearest Neighbour Search in a DataSet
Note: A FluidDataSet can be queried with an input point to return the nearest match to that point. Note: This feature is can be computationally expensive on a large dataset, as it needs to compute the distance of the queried point to each point in the dataset. If you need to perform multiple nearest neighbour queries on a fluid.dataset~ it is recommended to use FluidKDTree. This facility is most useful with smaller, ephemeral datasets such as those returned by FluidDataSetQuery.