...
Functions for MDA stores are the following:
Anchor | ||||
---|---|---|---|---|
|
This function creates a new dimension for any MDA store.
...
- The name for the store
- A list of the dimensions for the MDA store. Each entry is a list of TODOof borders (see MDADim)
Return value: null
Example:
Code Block |
---|
MDAInit("MyStore", ToList(MDADim(0.0, 200.0, ToInteger(3)))) |
MDADrop(String)
This function drops an existing MDA store.
Argument: The name for the store
Return value: null
Example:
Code Block |
---|
MDADrop("MyStore") |
MDAIndex(String, Double)
This function retrieves the index of an one-dimensional MDA store for a given value. In other words, it answers the quesion in which cell the values lies.
Short-cut for MDAIndices with one dimension.
Arguments:
- The name of the store
- The value to check
Note that it must be an one-dimensional MDA
Return value: Integer
The cell in which cell the values lies, or -1, if the value is outside the boundaries.
Example:
Using the Nexmark sources:
Code Block |
---|
MDAIndex("MyStore", price) |
Anchor | ||||
---|---|---|---|---|
|
This function retrieves the index of multi-dimensional MDA store for a given value. In other words, it answers the quesion in which cell the values lies.
Arguments:
- The name of the store
- The multi-dimensional value to check
Return value: List<Integer>
The cell in which cell the values lies, or -1 for any dimension, if the value is outside the boundaries of that dimension.
Example:
Using the Nexmark sources:
Code Block |
---|
MDAIndex("MyStore", ToList(price, ToDouble(initialbid))) |
MDAAddDim(String, [Integer,] List<Double>)
This function adds a new dimension to an existing MDA store.
Arguments:
- The name of the store
- Optional: The index of the dimension. Leave it out to add the dimension as the last dimension
- A list of borders (see MDADim)
Return value: null
Example:
Code Block |
---|
MDAAddDim("MyStore", MDADim(0.0, 200.0, ToInteger(3))) |
MDARemoveDim(String, Integer)
This function removes an existing dimension from an existing MDA store.
Arguments:
- The name of the store
- The index of the dimension to remove
Return value: null
Example:
Code Block |
---|
MDARemoveDim("MyStore", ToInteger(0)) |
MDAExchangeDim(String, Integer, List<Double>)
This function replaces en existing dimension of an existing MDA store with a new dimension.
Arguments:
- The name for the store
- The index of the dimension to exchange
- A list of new borders (see MDADim)
Return value: null
Example:
Code Block |
---|
MDAExchangeDim("MyDim", ToInteger(0), MDADim(200.0, 400.0, ToInteger(5))) |