# 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

## Examples

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