Description
Defines an input data set. Call this function before using any input object methods or properties.
Syntax
object.Define(TypeOfData As BDKDataType, IsDiscrete As Boolean, Normalize As Boolean, Data#())
Arguments
TypeOfData (Required BDKDataType) – the type of data given in the Data parameter:
IsDiscrete (Required Boolean) – If the data set is discrete. This must be FALSE if TypeOfData is BDKDataTypeDensity or BDKDataTypeCumulative.
Normalize (Required Boolean) - if TRUE, indicates that density data should be normalized to unit area by linear interpolation between points. This setting only has effect when TypeOfData is set to BDKDataTypeDensity.
Data (Required Array of Doubles) – the array of data. Depending on the values of the TypeOfData and IsDiscrete parameters, the format of this array can change. The possibilities are:
TypeOfData = BDKDataTypeSamples
IsDiscrete = FALSE
Data() = A one-dimensional array of values dimensioned as (1 to numSamples)
Restrictions: Sample values must be between –1E+37 and +1E+37.
TypeOfData = BDKDataTypeSamples
IsDiscrete = TRUE
Data() = A two-dimensional array of values dimensioned as (1 to 2, 1 to numPoints). The elements with the first dimension set to 1 (e.g. Data(1,1), Data(1,2), Data(1,3) etc.) are the sample values. The corresponding elements with the first dimension set to 2 (e.g. Data(2,1), Data(2,2), Data(2,3) etc.) are the number of times those sample values occurred.
Restrictions: Sample values must be integral values between –1E+37 and +1E+37, Count values must be positive integer values.
TypeOfData = BDKDataTypeDensity
IsDiscrete = FALSE
Data() = A two-dimensional array of values dimensioned as (1 to 2, 1 to numPoints). The elements with the first dimension set to 1 (e.g. Data(1,1), Data(1,2), Data(1,3) etc.) are the x-values. The corresponding elements with the first dimension set to 2 (e.g. Data(2,1), Data(2,2), Data(2,3) etc.) are the y-values.
Restrictions: x-values must be between –1E+37 and +1E+37. y-values must be between 0 and +1E+37. All x-values must be distinct and at least one y-value must be non-zero.
TypeOfData = BDKDataTypeCumulative
IsDiscrete = FALSE
Data() = A two-dimensional array of values dimensioned as (1 to 2, 1 to numPoints). The elements with the first dimension set to 1 (e.g. Data(1,1), Data(1,2), Data(1,3) etc.) are the x-values. The corresponding elements with the first dimension set to 2 (e.g. Data(2,1), Data(2,2), Data(2,3) etc.) are the p-values.
Restrictions: x-values must be between –1E+37 and +1E+37. p-values must be between 0 and 1. All x-values must be distinct and increasing x-value must always correspond to increasing p-values.
Return Value
None.
Example
'Continuous Sample Data:
Dim Data(1 to 100)
Data(1) = sample1
Data(2) = sample2
'---etc ---
InputObj.Define(RDKDataTypeSamples, FALSE, FALSE, Data)
'Discrete Sample Data
Dim Data(1 to 2, 1 to 100)
Data(1,1) = sample1
Data(2,1) = count1
Data(1,2) = sample2
Data(2,2) = count2
'---etc---
InputObj.Define(RDKDataTypeSamples, TRUE, FALSE, Data)
'Density Curve Data (Normalized)
Dim Data(1 to 2, 1 to 100)
Data(1,1) = x1
Data(2,1) = y1
Data(1,2) = x2
Data(2,2) = y2
'---etc---
InputObj.Define(RDKDataTypeDensity, FALSE, TRUE, Data)
'Cumulative Curve Data
Dim Data(1 to 2, 1 to 100)
Data(1,1) = x1
Data(2,1) = p1
Data(1,2) = x2
Data(2,2) = p2
'---etc---
InputObj.Define(RDKDataTypeCumulative, FALSE, FALSE, Data)