Next: , Previous: , Up: Directory Index   [Contents][Index]


2.16 lattices

Function File: coveringRadius = AnCoveringRadius ( dim )

Return covering-radius for the An lattice in n dimensions referring to lattice-definition corresponding to the generator returned by getAnsLatticeGenerator.m, i.e. Chap.4, Eq.(52) in Conway&Sloane(1999):

Note

can handle vector input

Examples

assert(AnCoveringRadius(1) > 0)
assert(AnCoveringRadius(2) > 0)
assert(AnCoveringRadius(3) > 0)
assert(AnCoveringRadius(4) > 0)
assert(AnCoveringRadius(5) > 0)
Function File: closest = AnFindClosestPoint ( x, embedded )

return the closest point of the An-lattice to the given point x in R^n based on Chap.20.2 ’Algorithm 3’ in Conway&Sloane (1999)

Note

this function can handle vector input

The boolean option input embedded (default=false) governs whether the input vectors are interpreted as vectors in the (n+1) dimensional embedding space of the lattice, otherwise they are interpreted as n-dimensional vectors in an n-dimensional lattice

Note

The returned lattice vectors use the same representation asthe input-vectors (i.e. embedded or not)

Note

can handle vector input

Examples

x = rand(3, 100000);
dx = x - AnFindClosestPoint(x);
assert(max(sqrt(dot(dx, dx))) <= AnCoveringRadius(3));
Function File: [ generator, rotator ] = AnGenerator ( dim )

return an nxn full-rank generating matrix for an An lattice, based on the (n+1)xn generator of Chap.4,Eq.(52) in Conway&Sloane(1999)

also returns the rotation-matrix that takes the nxn generator back to the (n+1)x n representation of the lattice space in n+1 dimensions, which is simply obtained by QR-decomposition of the (n+1)x n dimensional generator.

Examples

assert(issquare(AnsGenerator(1)))
assert(issquare(AnsGenerator(2)))
assert(issquare(AnsGenerator(3)))
assert(issquare(AnsGenerator(4)))
assert(issquare(AnsGenerator(5)))
Function File: packingRadius = AnPackingRadius ( dim )

Return the packing-radius for An* lattice in n dimensions, from Chap.4, Eq.(79) in Conway&Sloane(1999) referring to lattice-definition corresponding to the generator returned by AnLatticeGenerator(), i.e. Chap.4, Eq.(76) of CS99

Note

can handle vector input

Examples

assert(AnPackingRadius(1) == 1/sqrt(2))
assert(AnPackingRadius(5) == 1/sqrt(2))
Function File: coveringRadius = AnsCoveringRadius ( dim )

Return covering-radius for An* lattice in n dimensions referring to lattice-definition corresponding to the generator returned by getAnsLatticeGenerator.m, i.e. Chap.4, Eq.(76) in Conway&Sloane(1999):

Note

can handle vector input

Examples

assert(AnsCoveringRadius(1) > 0)
assert(AnsCoveringRadius(2) > 0)
assert(AnsCoveringRadius(3) > 0)
assert(AnsCoveringRadius(4) > 0)
assert(AnsCoveringRadius(5) > 0)
Function File: closest = AnsFindClosestPoint ( x, embedded )

return the closest point of the An*-lattice to the given point x in R^n based on Chap.20.3 ’Algorithm 4’ in Conway&Sloane (1999)

The boolean option input embedded (default=false) governs whether the input vectors are interpreted as vectors in the (n+1) dimensional embedding space of the lattice, otherwise they are interpreted as n-dimensional vectors in an n-dimensional lattice

Note

The returned lattice vectors use the same representation asthe input-vectors (i.e. embedded or not)

Note

can handle vector input

Examples

x = rand(3, 100000);
dx = x - AnsFindClosestPoint(x);
assert(max(sqrt(dot(dx, dx))) <= AnsCoveringRadius(3));
Function File: [ generator, rotator ] = AnsGenerator ( dim )

return an nxn full-rank generating matrix for an An* lattice, based on the (n+1)xn generator of Chap.4, Eq.(76) in Conway&Sloane(1999),

also returns a rotation-matrix that takes the nxn generator back to the (n+1)x n dimensional representation of the lattice space in n+1 dimensions. This is simply obtained by QR-decomposition of the (n+1)xn generator.

Examples

assert(issquare(AnsGenerator(1)))
assert(issquare(AnsGenerator(2)))
assert(issquare(AnsGenerator(3)))
assert(issquare(AnsGenerator(4)))
assert(issquare(AnsGenerator(5)))
Function File: ret = AnsKissingNumber ( dim )

Return the "kissing number", i.e. number of touching spheres to one lattice cell for an An* lattice in n dimensions, Sect.6.6 in Conway&Sloane(1999)

Note

can handle vector input

Examples

assert(AnsKissingNumber(1) > 0)
assert(AnsKissingNumber(2) > 0)
assert(AnsKissingNumber(3) > 0)
assert(AnsKissingNumber(4) > 0)
assert(AnsKissingNumber(5) > 0)
Function File: ret = AnsMinimalVectors ( dim )

return matrix containing the tau/2=(n+1) ’minimal’ vectors for An*, (tau is the kissing number) in n dimensions. The second half of minimal vectors is simply obtained by multiplying these by (-1). From Conway&Sloane(1991) "The cell Structure of Certain Lattices"

Examples

assert(size(AnsMinimalVectors(1)), [1, 2])
assert(size(AnsMinimalVectors(2)), [2, 3])
assert(size(AnsMinimalVectors(3)), [3, 4])
assert(size(AnsMinimalVectors(4)), [4, 5])
assert(size(AnsMinimalVectors(5)), [5, 6])
Function File: ret = AnsNormalizedThickness ( n )

normalized thickness (=center density) of An* lattice, from Chap.4, Eq.(82) in Conway&Sloane(1999)

Note

can handle vector input

Examples

assert(AnsNormalizedThickness(1) > 0)
assert(AnsNormalizedThickness(2) > 0)
assert(AnsNormalizedThickness(3) > 0)
assert(AnsNormalizedThickness(4) > 0)
assert(AnsNormalizedThickness(5) > 0)
Function File: ret = AnsNumVoronoiFacets ( dim )

Return the number of Voronoi-facets for An* lattice, which corresponds to the maximal number of facets of an n-dimension parallelohedron (see CS99), namely 2 ( 2^dim - 1 )

Note

can handle vector input

Examples

assert(AnsNumVoronoiFacets(1) > 0)
assert(AnsNumVoronoiFacets(2) > 0)
assert(AnsNumVoronoiFacets(3) > 0)
assert(AnsNumVoronoiFacets(4) > 0)
assert(AnsNumVoronoiFacets(5) > 0)
Function File: packingRadius = AnsPackingRadius ( dim )

Return the packing-radius for An* lattice in n dimensions, from Chap.4, Eq.(79) in Conway&Sloane(1999) referring to lattice-definition corresponding to the generator returned by AnsLatticeGenerator(), i.e. Chap.4, Eq.(76) of CS99

Note

can handle vector input

Examples

assert(AnsPackingRadius(1) > 0)
assert(AnsPackingRadius(2) > 0)
assert(AnsPackingRadius(3) > 0)
assert(AnsPackingRadius(4) > 0)
assert(AnsPackingRadius(5) > 0)
Function File: ret = AnsThickness ( n )

covering thickness of An* lattice for dimension n, from Chap.4, Eq.(82) in Conway&Sloane (1999)

Note

can handle vector input

Examples

assert(AnsThickness(1) > 0)
assert(AnsThickness(2) > 0)
assert(AnsThickness(3) > 0)
assert(AnsThickness(4) > 0)
assert(AnsThickness(5) > 0)
Function File: vol = AnsVolume ( dim )

Return the "lattice-volume" (i.e. the volume of an elementary lattice-cell) for an An* lattice in dim dimensions. This is referring to the lattice-definition used by AnsGenerator.m, i.e. Chap.4, Eq.(76) of Conway&Sloane(1999).

Note

can handle vector input

Examples

assert(AnsVolume(1) > 0)
assert(AnsVolume(2) > 0)
assert(AnsVolume(3) > 0)
assert(AnsVolume(4) > 0)
assert(AnsVolume(5) > 0)
Function File: vol = AnVolume ( dim )

Return the "lattice-volume" (i.e. the volume of an elementary lattice-cell) for an An lattice in dim dimensions. This is referring to the lattice-definition used by AnGenerator.m,

Note

can handle vector input

Examples

assert(AnVolume(1) > 0)
assert(AnVolume(2) > 0)
assert(AnVolume(3) > 0)
assert(AnVolume(4) > 0)
assert(AnVolume(5) > 0)
Function File: ret = CoxeterFewRogersBound ( n )

returns Coxter-Few-Rogers bound on thickness in dimension n taken from Conway&Sloane (1999), Chap.2, Eq.(17)

Note

can handle vector input

Examples

assert(CoxeterFewRogersBound(1) > 0)
assert(CoxeterFewRogersBound(2) > 0)
assert(CoxeterFewRogersBound(3) > 0)
assert(CoxeterFewRogersBound(4) > 0)
assert(CoxeterFewRogersBound(5) > 0)
Function File: ret = CoxeterFewRogersBoundNormalized ( n )

returns Coxter-Few-Rogers bound on normalized thickness in dimension n taken from Conway&Sloane (1999), Chap.2, Eq.(17)

Note

can handle vector input

Examples

assert(CoxeterFewRogersBoundNormalized(1) > 0)
assert(CoxeterFewRogersBoundNormalized(2) > 0)
assert(CoxeterFewRogersBoundNormalized(3) > 0)
assert(CoxeterFewRogersBoundNormalized(4) > 0)
assert(CoxeterFewRogersBoundNormalized(5) > 0)
Function File: ret = getAnsLatticeProperties ( dim )

Return a struct holding important properties of An* lattice in n-dimensions from Chap.4, Sect.6.6 in Conway&Sloane(1999):

Examples

assert(isstruct(getAnsLatticeProperties(1)))
assert(isstruct(getAnsLatticeProperties(2)))
assert(isstruct(getAnsLatticeProperties(3)))
assert(isstruct(getAnsLatticeProperties(4)))
assert(isstruct(getAnsLatticeProperties(5)))
Function File: R = LatticeCoveringRadius ( dim, lattice )

return the covering radius for the given lattice lattice is one of the strings {Zn, An, Ans}

Note

can handle vector input in dim

Examples

assert(LatticeCoveringRadius(1, "Zn") > 0)
assert(LatticeCoveringRadius(1, "An") > 0)
assert(LatticeCoveringRadius(1, "Ans") > 0)
assert(LatticeCoveringRadius(2, "Zn") > 0)
assert(LatticeCoveringRadius(2, "An") > 0)
assert(LatticeCoveringRadius(2, "Ans") > 0)
assert(LatticeCoveringRadius(3, "Zn") > 0)
assert(LatticeCoveringRadius(3, "An") > 0)
assert(LatticeCoveringRadius(3, "Ans") > 0)
Function File: closest = LatticeFindClosestPoint ( x, lattice )

return the closest point of the lattice to the given point x in R^n This is just a wrapper to the lower-level lattice-specific functions. lattice is one of the strings {Zn, An, Ans}

Note

can handle vector input in x

Examples

assert(isvector(LatticeFindClosestPoint(rand(4, 1), "Zn")))
assert(isvector(LatticeFindClosestPoint(rand(4, 1), "An")))
assert(isvector(LatticeFindClosestPoint(rand(4, 1), "Ans")))
Function File: [ gen, rot ] = LatticeGenerator ( dim, lattice )

return an nxn full-rank generating matrix for the specified lattice This is just a wrapper to the lower-level lattice-specific functions. lattice is one of the strings {Zn, An, Ans}

Examples

assert(issquare(LatticeGenerator(1, "Zn")))
assert(issquare(LatticeGenerator(1, "An")))
assert(issquare(LatticeGenerator(1, "Ans")))
assert(issquare(LatticeGenerator(2, "Zn")))
assert(issquare(LatticeGenerator(2, "An")))
assert(issquare(LatticeGenerator(2, "Ans")))
assert(issquare(LatticeGenerator(3, "Zn")))
assert(issquare(LatticeGenerator(3, "An")))
assert(issquare(LatticeGenerator(3, "Ans")))
Function File: hgrm = LatticeMismatchHist ( dim, lattice, opt, val, … )

Generates a normalised mismatch histogram for the given lattice

Arguments

hgrm

returned mismatch histogram

dim

number of lattice dimensions

lattice

lattice type; see e.g. LatticeFindClosestPoint()

Options

N

number of points to use in generating histogram [default:1e6]

dbin

bin size of histogram [default: 0.01]

mu_max

use this maximum mismatch [default: 1.0]

use_cache

if true [default], use a cached version of the lattice mismatch histogram, if available. Note that the cached histogram will probably contain more points than requested in N.

Examples

See the tutorial on LatticeMismatchHist().

Function File: R = LatticeNormalizedThickness ( dim, lattice )

returns normalized thicknesses in n dimensions lattice is one of the strings { "Zn", "Ans" }

Note

can handle vector input in dim

Examples

assert(LatticeNormalizedThickness(1, "Zn") > 0)
assert(LatticeNormalizedThickness(1, "Ans") > 0)
assert(LatticeNormalizedThickness(2, "Zn") > 0)
assert(LatticeNormalizedThickness(2, "Ans") > 0)
assert(LatticeNormalizedThickness(3, "Zn") > 0)
assert(LatticeNormalizedThickness(3, "Ans") > 0)
Function File: R = LatticePackingRadius ( dim, lattice )

return the packing radius for the given lattice lattice is one of the strings {Zn, An, Ans}

Note

can handle vector input in dim

Examples

assert(LatticePackingRadius(1, "Zn") > 0)
assert(LatticePackingRadius(1, "An") > 0)
assert(LatticePackingRadius(1, "Ans") > 0)
assert(LatticePackingRadius(2, "Zn") > 0)
assert(LatticePackingRadius(2, "An") > 0)
assert(LatticePackingRadius(2, "Ans") > 0)
assert(LatticePackingRadius(3, "Zn") > 0)
assert(LatticePackingRadius(3, "An") > 0)
assert(LatticePackingRadius(3, "Ans") > 0)
Function File: vol = LatticeVolume ( dim, lattice )

return the lattice volume (ie volume of the fundamental cell) of given lattice’ lattice is one of the strings { "Zn", "An", "Ans" }

Note

can handle vector input in dim

Examples

assert(LatticeVolume(1, "Zn") > 0)
assert(LatticeVolume(1, "An") > 0)
assert(LatticeVolume(1, "Ans") > 0)
assert(LatticeVolume(2, "Zn") > 0)
assert(LatticeVolume(2, "An") > 0)
assert(LatticeVolume(2, "Ans") > 0)
assert(LatticeVolume(3, "Zn") > 0)
assert(LatticeVolume(3, "An") > 0)
assert(LatticeVolume(3, "Ans") > 0)
Function File: ret = RegularSimplexVolume ( n )

volume of regular simplex in n dimensions with unit side-length, Chap.21, Eq.(12) in Conway&Sloane (1999)

Note

can handle vector input

Examples

assert(RegularSimplexVolume(1) > 0)
assert(RegularSimplexVolume(2) > 0)
assert(RegularSimplexVolume(3) > 0)
assert(RegularSimplexVolume(4) > 0)
assert(RegularSimplexVolume(5) > 0)
Function File: ret = RogersBoundNormalized ( n )

Rogers’ upper bound on (normalized) packing density in n dimensions from Chap.1, Conway&Sloane(1999)

Note

can handle vector input

Examples

assert(RogersBoundNormalized(1:5) > 0)
Function File: ret = UnitHypersphereVolume ( n )

Volume of unit hypersphere in n dimensions: Vn = pi^(n/2) / (n/2)!, from Chap.21, Eq.(7) in Conway&Sloane(1999)

Note

can handle vector input

Examples

assert(UnitHypersphereVolume(1) > 0)
assert(UnitHypersphereVolume(2) > 0)
assert(UnitHypersphereVolume(3) > 0)
assert(UnitHypersphereVolume(4) > 0)
assert(UnitHypersphereVolume(5) > 0)
Function File: coveringRadius = ZnCoveringRadius ( dim )

Return covering-radius for the Zn lattice in n dimensions

Note

can handle vector input

Examples

assert(ZnCoveringRadius(1) > 0)
assert(ZnCoveringRadius(2) > 0)
assert(ZnCoveringRadius(3) > 0)
assert(ZnCoveringRadius(4) > 0)
assert(ZnCoveringRadius(5) > 0)
Function File: close = ZnFindClosestPoint ( x )

return the closest point of the (hypercubic) Zn-lattice to the given point x in R^n based on Chap.20.2 in Conway&Sloane (1999). This is the most trivial case.

Note

can handle vector input

Examples

x = rand(3, 100000);
dx = x - ZnFindClosestPoint(x);
assert(max(sqrt(dot(dx, dx))) <= ZnCoveringRadius(3));
Function File: [ generator, rotator ] = ZnGenerator ( dim )

Return an nxn full-rank generating matrix for the Zn lattice; this is trivial, of course, but added for completeness.

Examples

assert(issquare(ZnGenerator(1)))
assert(issquare(ZnGenerator(2)))
assert(issquare(ZnGenerator(3)))
assert(issquare(ZnGenerator(4)))
assert(issquare(ZnGenerator(5)))
Function File: ret = ZnNormalizedThickness ( n )

returns normalized thickness of hypercubic grid in n dimensions

Note

can handle vector input

Examples

assert(ZnNormalizedThickness(1) > 0)
assert(ZnNormalizedThickness(2) > 0)
assert(ZnNormalizedThickness(3) > 0)
assert(ZnNormalizedThickness(4) > 0)
assert(ZnNormalizedThickness(5) > 0)
Function File: packingRadius = ZnPackingRadius ( dim )

Return packing-radius for the Zn lattice in n dimensions

Note

can handle vector input

Examples

assert(ZnPackingRadius(1) == 1/2)
assert(ZnPackingRadius(5) == 1/2)
Function File: ret = ZnThickness ( n )

normalized thickness of hypercubic grid in n dimensions

Note

can handle vector input

Examples

assert(ZnThickness(1) > 0)
assert(ZnThickness(2) > 0)
assert(ZnThickness(3) > 0)
assert(ZnThickness(4) > 0)
assert(ZnThickness(5) > 0)
Function File: vol = ZnVolume ( dim )

Return the "lattice-volume" (i.e. the volume of an elementary lattice-cell) for a Zn lattice in dim dimensions. This is referring to the lattice-definition used by ZnGenerator.m,

Note

can handle vector input

Examples

assert(ZnVolume(1) > 0)
assert(ZnVolume(2) > 0)
assert(ZnVolume(3) > 0)
assert(ZnVolume(4) > 0)
assert(ZnVolume(5) > 0)

Next: , Previous: , Up: Directory Index   [Contents][Index]