treams.lattice.cython_lattice.nedge

treams.lattice.cython_lattice.nedge(d, n)

Number of points on the surface of a d-dimensional cube with side length 2n.

Computes \((2n + 1)^d - (2n - 1)^d\) and for \(n = 0\) returns \(1\).

Parameters:
  • d (int) – Spatial dimensions

  • n (int) – Half size

Returns:

int