Contents Previous Next


Define Method (BDKInput Object)

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:

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)