Lattice - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


PolyhedralSets[ZPolyhedralSets]

  

Lattice

  

construct an integer lattice

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

Lattice(matrix, vector)

Lattice(lattice)

Parameters

matrix

-

a matrix with only integer entries

vector

-

a vector with only integer entries

lattice

-

lattice to copy

Description

• 

Lattice(matrix, vector) returns the integer lattice generated by matrix and vector. The lattice generated by matrix and vector is the set of all integer points obtained by multiplying matrix on the right by an integer vector and adding vector to that product.

• 

The number of rows of matrix must match the number of entries of vector. Otherwise, an error is raised.

• 

In some literature, a lattice of the d-dimensional Euclidean space consists of all linear combinations with integer coefficients of a basis of that space. In some other literature, see the reference below, the notion of a lattice precisely matches that of this command.

• 

By default, matrix and vector are copied after creating the lattice.

Examples

withPolyhedralSets:

withZPolyhedralSets:

withplots:

withLinearAlgebra:

Create the two-dimensional integer lattice, that is, all couples of integers

LLatticeMatrix1,0,0,1,Vector0,0

LLattice1001,00

(1)

Plot the two-dimensional integer lattice

plots:-pointplotseqseqx,y,x=5..5,y=5..5

Create another two-dimensional lattice,

AMatrix2,0,0,1;VVector0,0;LLatticeA,V

A200−1

V00

LLattice200−1,00

(2)

Access the data of the lattice

GetMatrixL;GetVectorL

200−1

00

(3)

Plot this two-dimensional lattice

LseqseqVectorAddMatrixVectorMultiplyA,Vectorx,y,V,x=5..5,y=5..5

L−105,−85,−65,−45,−25,05,25,45,65,85,105,−104,−84,−64,−44,−24,04,24,44,64,84,104,−103,−83,−63,−43,−23,03,23,43,63,83,103,−102,−82,−62,−42,−22,02,22,42,62,82,102,−101,−81,−61,−41,−21,01,21,41,61,81,101,−100,−80,−60,−40,−20,00,20,40,60,80,100,−10−1,−8−1,−6−1,−4−1,−2−1,0−1,2−1,4−1,6−1,8−1,10−1,−10−2,−8−2,−6−2,−4−2,−2−2,0−2,2−2,4−2,6−2,8−2,10−2,−10−3,−8−3,−6−3,−4−3,−2−3,0−3,2−3,4−3,6−3,8−3,10−3,−10−4,−8−4,−6−4,−4−4,−2−4,0−4,2−4,4−4,6−4,8−4,10−4,−10−5,−8−5,−6−5,−4−5,−2−5,0−5,2−5,4−5,6−5,8−5,10−5

(4)

plots:-pointplotL,color=blue

Create the three-dimensional integer lattice, that is, all triples of integers

LLatticeMatrix1,0,0,0,1,0,0,0,1,Vector0,0,0

LLattice100010001,000

(5)

Plot the three-dimensional integer lattice

plots:-pointplot3dseqseqseqx,y,z,x=5..5,y=5..5,z=5..5

References

  

Rachid Seghir, Vincent Loechner, and Benoı̂t Meister. "Integer affine transformations of parametric Z-polytopes and applications to loop nest optimization." Proceedings of TACO, Vol. 9(2):8:1–8:27, 2012.

Compatibility

• 

The PolyhedralSets:-ZPolyhedralSets:-Lattice package was introduced in Maple 2023.

• 

For more information on Maple 2023 changes, see Updates in Maple 2023.

See Also

ZPolyhedralSets

PolyhedralSets