RandVariable-class: Random variable

Description Objects from the Class Slots Methods Author(s) See Also Examples

Description

Class of random variables; i.e., measurable maps from Domain to Range. The elements contained in the list Map are functions in one(!) argument named “x”.

Objects from the Class

Objects can be created by calls of the form new("RandVariable", ...). More frequently they are created via the generating function RandVariable.

Slots

Map

Object of class "list": list of functions.

Domain

Object of class "OptionalrSpace": domain of the random variable.

Range

Object of class "OptionalrSpace": range of the random variable.

Methods

Map

signature(object = "RandVariable"): accessor function for the slot Map.

Domain

signature(object = "RandVariable"): accessor function for the slot Domain.

Range

signature(object = "RandVariable"): accessor function for the slot Range.

Map<-

signature(object = "RandVariable"): replacement function for the slot Map.

Domain<-

signature(object = "RandVariable"): replacement function for the slot Domain.

Range<-

signature(object = "RandVariable"): replacement function for the slot Range.

compatibleDomains

signature(e1 = "RandVariable", e2 = "RandVariable"): test if the domains of two random variables are compatible.

length

signature(object = "RandVariable"): length of the list of functions in slot Map.

show

signature(object = "RandVariable")

Author(s)

Matthias Kohl [email protected]

See Also

RandVariable, EuclRandVariable-class, EuclRandMatrix-class, EuclRandVarList-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
(R1 <- new("RandVariable"))
Map(R1)
Domain(R1)
Range(R1)
Map(R1) <- list(function(x){ceiling(x)}, function(x){floor(x)})
Domain(R1) <- Reals()
Range(R1) <- Naturals()
R1
Map(R1)
length(R1)

R2 <- R1
Domain(R2) <- Naturals()
compatibleDomains(R1, R2)
Domain(R2) <- NULL
compatibleDomains(R1, R2)
Domain(R2) <- EuclideanSpace(dimension = 1)
compatibleDomains(R1, R2)
Domain(R2) <- EuclideanSpace(dimension = 2)
compatibleDomains(R1, R2)

RandVar documentation built on May 2, 2019, 5:20 p.m.