distr (version 2.5.2)

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.

Extends

Class "rSpace", directly.

concept

  • space
  • S4 space class
  • set

See Also

rSpace-class LatticeDistribution-class

Examples

Run this code
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 DataCamp Workspace