MasterScan
Lab_Matlab_control Master Branch
|
Represents a discrete, finite, rectangular space, of multiple dimensions.
Provides utilities for working with the space.
Each topsSpace object represents a finite, discrete rectangular space.
Properties and Events | |
Property | name = '' |
string name to describe the space | |
Protected Properties | |
Property | dimensions |
set of dimensions that make up the space | |
Property | nPoints = 0 |
number of points in the whole space | |
Property | nDimPoints |
number of points in each dimension | |
Property | dimNames |
name of each dimension | |
Property | subscriptCoefs |
subscript coefficients for each dimension | |
Property | minimums |
minumum value for each dimension | |
Property | maximums |
maximum value for each dimension | |
Property | granularities |
granularity for each dimension | |
Methods | |
self | topsSpace (name, dimensions) |
Construct a space. More... | |
self | setDimensions (self, dimensions) |
Assign the set of dimensions that make up the space. More... | |
subscripts | subscriptsForValues (self, values) |
Get dimension subscripts from raw values. More... | |
values | valuesForSubscripts (self, subscripts) |
Get dimension values from subscripts. More... | |
grandIndex | indexForSubscripts (self, subscripts) |
Get a grand space index from dimension subscripts. More... | |
subscripts | subscriptsForIndex (self, grandIndex) |
Get dimension subscripts from a grand space index. More... | |
self topsSpace | ( | name | , |
dimensions | |||
) |
Construct a space.
name | a descriptive name for the space |
dimensions | array of topsDimension objects |
All parameters are optional. If provided, asigns the given name and dimensions to the new space.
self setDimensions | ( | self | , |
dimensions | |||
) |
Assign the set of dimensions that make up the space.
dimensions | array of topsDimension objects |
Assigns the given dimensions to this object and does realted bookkeeping.
Returns the updated topsSpace object.
subscripts subscriptsForValues | ( | self | , |
values | |||
) |
Get dimension subscripts from raw values.
values | array with one value per dimension |
values must contain one value for each dimension in the space. Returns an array of subscripts with one subscript per dimension. The subscript for each dimension is the index into that dimension of the point closes to the given value. Subscripts range from 1 to nPoints for each dimension.
values valuesForSubscripts | ( | self | , |
subscripts | |||
) |
Get dimension values from subscripts.
subscripts | array with one subscript per dimension |
subscripts must contain one value for each dimension in the space. Each subscript should be in the range 1 through nPoints for that dimension. Returns an array of values values with one point from each dimension.
grandIndex indexForSubscripts | ( | self | , |
subscripts | |||
) |
Get a grand space index from dimension subscripts.
subscripts | array with one subscript per dimension |
subscripts must contain one value for each dimension in the space. Each subscript should be in the range 1 through nPoints for that dimension. Returns the grand index computed from all of the subscripts. The grand index will be in the range 1 through nPoints.
subscripts subscriptsForIndex | ( | self | , |
grandIndex | |||
) |
Get dimension subscripts from a grand space index.
grandIndex | a grand index into the space |
grandIndex must be a one-dimensional index into the space, in the range 1 through nPoints. Returns subscripts for indivudual dimensions, corresponding to grandIndex. Each subscript will be in the range 1 through nPoints, for that dimension.