mtkFactor-class: The 'mtkFactor' class

Description Class Hierarchy Constructor Slots Methods Author(s) Examples

Description

The class used to manage an input factor and its uncertainty distribution.

Class Hierarchy

Parent classes :
Direct Known Subclasses :

Constructor

mtkFactor

signature(name="unkown", id="unkown", unit="", type="numeric", domain=mtkDomain(), featureList=list())

Slots

name:

the name of the input factor.

id:

the name of the factor in the simulation code, if different from name.

unit:

the measurement units of the factor values. This can be used in graphics or reports, for example.

type:

the data type of the factor's values.

domain:

the mtkDomain object that describes the factor's uncertainty.

featureList:

the list of features that may be associated with the factor.

Methods

initialize

signature(.Object = "mtkFactor"): The initializer of the class mtkFactor.

getName

signature(this="mtkFactor"): Fetches the name of the factor.

getType

signature(this = "mtkFactor"): Returns the data type of the factor's levels.

getDomain

signature(this="mtkFactor"): Fetches the domain associated with the factor. It returns an object of the class mtkDomain.

getDistributionName

signature(this="mtkFactor"): Fetches the name of the distribution associated with the uncertainty domain.

getDistributionNominalValue

signature(this="mtkFactor"): Fetches the nominal value of the distribution associated with the uncertainty domain.

getDistributionNominalValueType

signature(this="mtkFactor"): Fetches the data type associated with the uncertainty domain.

getDiscreteDistributionType

signature(this="mtkFactor"): Returns the discrete distribution type.

getDiscreteDistributionLevels

signature(this="mtkFactor"): Returns the levels managed by a discrete distribution.

getDiscreteDistributionWeights

signature(this="mtkFactor"): Returns the weights managed by a discrete distribution.

getDistributionParameters

signature(this="mtkFactor"): The getDistributionParameters method.

getFeatures

signature(this="mtkFactor"): Returns the features as a named list.

getMTKFeatures

signature(this="mtkFactor"): Returns the features as a vector of objects from the class mtkFeature.

setName

signature(this = "mtkFactor", name = "character"): Gives a new name to the factor.

setDomain

signature(this = "mtkFactor", domain = "mtkDomain"): Associates a new domain with the factor.

setType

signature(this = "mtkFactor", type = "character"): Names explicitly the data type managed by the factor.

setFeatures

signature(this="mtkFactor",aFList="list): Gives new features to the factor. aFList may be a vector of objects from the class mtkFeature or a named list from which we can build a list of features.

print

signature(x = "mtkFactor"): Prints the data managed by the factor.

show

signature(object = "mtkFactor"): Displays the underlying object of the class mtkFactor.

Author(s)

Juhui WANG and Hervé Monod, MIA-jouy, INRA, Hervé Richard, BioSP, INRA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Manage a factor x1 with  a mtkFactor object.

	x1 <- make.mtkFactor(name="x1", distribName="unif",
		 distribPara=list(min=-pi, max=pi)) 
	getName(x1)
	getDomain(x1)
	getDistributionName(x1)
	getType(x1) 
	setType(x1, "double")
	getType(x1); # 'double'

mtk documentation built on May 2, 2019, 4:15 a.m.