what size is a "unit torus"? Wikipedia articles on "unit sphere" and "unit circle" say the radius is 1. Articles on the "unit square" and "unit cube" say the length of the side is 1. Would you expect a unit torus to have major radius 1 or major diameter 1?
Admittedly, a torus is a different animal than a sphere, but... It feels most natural to me that the "unit" length should apply to the (major) radius, not the major diameter. Yet I recently came across open source code where someone generated a "unit torus" of major diameter 1.
Is that "wrong enough" that I should change it (in a package of related changes that I'm already preparing to submit)? Can you give me a more solid mathematical basis for advocating that change? Or should I accept the status quo as just a different but legitimate interpretation of "unit torus"?
Edit:
I see from search hits like the following


*

*Spectral Analysis of Virus Spreading in Random Geometric Graphs

*Unconditional Proof of the Boltzmann-Sinai Ergodic Hypothesis

*The cover time of random geometric graphs

*Dimers and amoebae
that the term "unit torus" is used in some fields, like dynamical systems and discrete algorithms. But I'm unable to tell from these papers or abstracts what the authors mean exactly by "unit torus". Dimers and amoebae actually gives this definition:

the unit torus T2 = {(z,w) ∈ C2 : |z|
  = |w| = 1}

This definition appears to give a definite size. But if it's in the two-dimensional vector space over the complex numbers, I don't know how to apply it to $\mathbb{R}^3$.
If "unit torus" (in $\mathbb{R}^3$) actually means something that does not have any particular size, then that would be important to know.
My question is really not one of programming, but of what this term means in mathematics... including, to what degree is it actually defined (or not) in math?
I will base my software decisions on that information.
(Would tag this "torus" if I could create the tag.)
 A: My best guess is that the unit $d$-torus is the quotient $\mathbb{R}^d/\mathbb{Z}^d$, endowed with some combination of the following additional structures depending on the field of mathematics in consideration:


*

*The structure of a topological group (with the quotient topology and the quotient group structure),

*The structure of a Riemannian manifold (with the induced flat metric; this means that it is not curved, by contrast with the induced metric on the usual torus in $\mathbb{R}^3$)

*The structure of a probability space.


None of these structures depend on an embedding into $\mathbb{R}^n$.  The naming is by analogy with the case $d = 1$, where one gets a description of the usual topological group structure on the circle but, again, without a preferred embedding into $\mathbb{R}^n$.  None of these structures suggest a good definition of "unit torus" in $\mathbb{R}^3$.  In particular, as Willie notes in the comments, $\mathbb{R}^2/\mathbb{Z}^2$ with the flat metric can't even isometrically embed into $\mathbb{R}^3$
A: The unit torus (in these cases) refers to a torus of major radius $R$ and minor radius $r$ of surface area $4\pi^2 R r=1$. As such it is the "unit square" with periodic boundary conditions.
In random geometric graphs, the boundary of the domain plays an important role in much graph-theoretic behaviour. Sometimes it is useful to analyse graphs not inside the unit square, but rather on the surface of a torus with unit surface area (remembering that the torus is constructed by sewing the parallel edges of a square together). This removes boundary effects on the random geometric graphs.
Below is the unit square with two small obstacle-like regions removed from the domain. We might ask how the obstacles effect the connectivity of the graphs, but this can be difficult when there are "outer" boundary effects that obscure the effects of the obstacles.

We can solve this problem by working on the surface of a torus, since the only impact on the connectivity is (to some extent) the obstacles.
