Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Lattice-class

Class "Lattice"


Description

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.

Usage

Lattice(pivot = 0, width = 1, Length = 2, name = "a lattice")

Arguments

pivot

the (finite) utmost left or right value of the lattice

width

the (finite) grid-width; if negative the lattice is expanded to the left, else to the right

Length

the (possibly infinite) length of the lattice

name

the (possibly empty) name of the lattice (inherited from class rSpace)

Objects from the Class

Objects may be generated by calling the generating function Lattice.

Slots

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"

Extends

Class "rSpace", directly.

Methods

pivot

signature(.Object = "Lattice"): returns the 'pivot' slot

pivot<-

signature(.Object = "Lattice"): modifies the 'pivot' slot

width

signature(.Object = "Lattice"): returns the 'width' slot

width<-

signature(.Object = "Lattice"): modifies the 'width' slot

Length

signature(.Object = "Lattice"): returns the 'Length' slot

Length<-

signature(.Object = "Lattice"): modifies the 'Length' slot

Author(s)

See Also

Examples

L <- Lattice(pivot = 0, width = 1, Length = Inf, name = "the Naturals")
name(L)
pivot(L) <- 1 ### now starting from 1

distr

Object Oriented Implementation of Distributions

v2.8.0
LGPL-3
Authors
Florian Camphausen [ctb] (contributed as student in the initial phase --2005), Matthias Kohl [aut, cph], Peter Ruckdeschel [cre, cph], Thomas Stabla [ctb] (contributed as student in the initial phase --2005), R Core Team [ctb, cph] (for source file ks.c/ routines 'pKS2' and 'pKolmogorov2x')
Initial release
2019-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.