Class Lattice
formalizes an affine linearly generated grid
of (support) points pivot + (0:(Length-1)) * width
;
this is used for subclass LatticeDistribution
of class
DiscreteDistribution
which in addition to the latter contains a slot
lattice
of class Lattice
.
Lattice(pivot = 0, width = 1, Length = 2, name = "a lattice")
Objects may be generated by calling the generating function Lattice
.
the (finite) utmost left or right value of the lattice
the (finite) grid-width; if negative the lattice is expanded to the left, else to the right
the (possibly infinite) length of the lattice
the (possibly empty) name of the lattice
(inherited from class rSpace
)
pivot
Object of class "numeric"
:
--- the pivot of the lattice; must be of length 1
width
Object of class "numeric"
:
--- the width of the lattice; must be of length 1 and
must not be 0
Length
Object of class "numeric"
:
--- the width of the lattice; must be an integer > 0
of length 1
name
Object of class "character"
:
the name of the space, by default = "a lattice"
Class "rSpace"
, directly.
signature(.Object = "Lattice")
:
returns the 'pivot'
slot
signature(.Object = "Lattice")
:
modifies the 'pivot'
slot
signature(.Object = "Lattice")
:
returns the 'width'
slot
signature(.Object = "Lattice")
:
modifies the 'width'
slot
signature(.Object = "Lattice")
:
returns the 'Length'
slot
signature(.Object = "Lattice")
:
modifies the 'Length'
slot
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
rSpace-class
LatticeDistribution-class
L <- Lattice(pivot = 0, width = 1, Length = Inf, name = "the Naturals")
name(L)
pivot(L) <- 1 ### now starting from 1
Run the code above in your browser using DataLab