OptimisationMaskCollection

A collection of optimisation masks.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Add an optimisation mask for the given list of values

xValues = {0, 1, 2, 3, 4}
yValues = {0, 10, 20, 20, 30}
project.Optimisation.Masks:Add(xValues, yValues)

    -- Check if the collection of masks contains one labelled "Mask1"

hasMask = project.Optimisation.Masks:Contains("Mask1")

Usage locations (collections)

The following objects contain the OptimisationMaskCollection collection:

Property List

Count
The number of OptimisationMask items in the collection. (Read only number)
Type
The object type string. (Read only string)

Method List

Add (properties table)
Create an optimisation mask. (Returns a OptimisationMask object.)
Add (xvaluelist List of Expression, yvaluelist List of Expression)
Create an optimisation mask. (Returns a OptimisationMask object.)
Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
Item (index number)
Returns the OptimisationMask at the given index. (Returns a OptimisationMask object.)
Item (label string)
Returns the OptimisationMask with the given label. (Returns a OptimisationMask object.)
Items ()
Returns a table of OptimisationMask. (Returns a List of OptimisationMask object.)
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)

Index List

[number]
Returns the OptimisationMask at the given index in the collection. (Read OptimisationMask)
[string]
Returns the OptimisationMask with the given name in the collection. (Read OptimisationMask)

Property Details

Count
The number of OptimisationMask items in the collection.
Type
number
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Method Details

Add (properties table)
Create an optimisation mask.
Input Parameters
properties(table)
A table of properties defining the optimisation mask.
Return
OptimisationMask
An optimisation mask.
Add (xvaluelist List of Expression, yvaluelist List of Expression)
Create an optimisation mask.
Input Parameters
xvaluelist(List of Expression)
The x values of the mask.
yvaluelist(List of Expression)
The y values of the mask.
Return
OptimisationMask
An optimisation mask.
Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the OptimisationMask.
Return
boolean
The success of the check.
Item (index number)
Returns the OptimisationMask at the given index.
Input Parameters
index(number)
The index of the OptimisationMask.
Return
OptimisationMask
The OptimisationMask at the given index.
Item (label string)
Returns the OptimisationMask with the given label.
Input Parameters
label(string)
The label of the OptimisationMask.
Return
OptimisationMask
The OptimisationMask with the given label.
Items ()
Returns a table of OptimisationMask.
Return
List of OptimisationMask
A table of OptimisationMask.
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.
Input Parameters
label(string)
The base name.
Return
boolean
The generated unique name label for OptimisationMask.