MasterScan  Lab_Matlab_control Master Branch
List of all members | Properties and Events | Protected Properties | Methods
topsSpace Class Reference

Overview

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...
 

Constructor

◆ topsSpace()

self topsSpace ( name  ,
dimensions   
)

Construct a space.

Parameters
namea descriptive name for the space
dimensionsarray of topsDimension objects

All parameters are optional. If provided, asigns the given name and dimensions to the new space.

Methods

◆ setDimensions()

self setDimensions ( self  ,
dimensions   
)

Assign the set of dimensions that make up the space.

Parameters
dimensionsarray of topsDimension objects

Assigns the given dimensions to this object and does realted bookkeeping.

Returns the updated topsSpace object.

◆ subscriptsForValues()

subscripts subscriptsForValues ( self  ,
values   
)

Get dimension subscripts from raw values.

Parameters
valuesarray 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.

◆ valuesForSubscripts()

values valuesForSubscripts ( self  ,
subscripts   
)

Get dimension values from subscripts.

Parameters
subscriptsarray 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.

◆ indexForSubscripts()

grandIndex indexForSubscripts ( self  ,
subscripts   
)

Get a grand space index from dimension subscripts.

Parameters
subscriptsarray 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.

◆ subscriptsForIndex()

subscripts subscriptsForIndex ( self  ,
grandIndex   
)

Get dimension subscripts from a grand space index.

Parameters
grandIndexa 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.


The documentation for this class was generated from the following file: