Skip to content

Design_Space_api

Christoffer Fink edited this page Sep 1, 2014 · 1 revision

A design space consists of a set of parameters. It supports two main operations.

  • Generating values for individual parameters by ID.
  • Creating a fully initialized design.

In InPUT4j, a design space is represented by the IDesignSpace interface.

next value

This operation generates a value based on the parameter definition with a specific ID.

Trying to generate a value for a parameter ID that is not supported is legal. A [null][Terms_null] value should be returned in that case.

In InPUT4j, this operation is supported by the next method.

next design

This operation creates a design based on a design space. It should be possible to create a fully initialized design or an empty design, meaning that none of the parameters are initialized. It should also be possible to create a design that is read-only.

Note that initialization may be lazy or eager. What separates an empty design from a regular non-empty design is not when parameters are initialized but whether they are, at some point, initialized automatically by InPUT.

In InPUT4j, this operation is supported by the nextDesign and nextEmptyDesign methods.

fix parameter

This operation allows the value of a parameter with a specific ID to be fixed. This means that a parameter that was not originally defined as fixed can be treated as if it was defined as fixed.

The parameter can be fixed multiple times. Numeric parameters can also be fixed to arbitrary numeric values, regardless of any range definitions.

In InPUT4j, this operation is supported by the setFixed method.

supported parameters

This operation produces the set of IDs of all the parameters that make up a design space.

Generated IDs (i.e. IDs of array elements) are not included in the set.

In InPUT4j, this operation is supported by the getSupportedParamIds method.

export

This operation allows a design space to be exported in some appropriate format.

In InPUT4j, this operation is supported by the export method, which takes some Strategy depending on the desired format.

Suggestions for future versions

Trying to generate a value for an invalid parameter ID should be illegal.

Supported IDs should include all the IDs that are valid.

It should not be legal to fix a numeric parameter to an out-of-range value.

Clone this wiki locally