public class Sphere1D extends java.lang.Object implements java.io.Serializable, Space
We use here the topologists definition of the 1-sphere (see Sphere on MathWorld), i.e. the 1-sphere is the one-dimensional closed curve defined in 2D as x2+y2=1.
Modifier and Type | Class and Description |
---|---|
private static class |
Sphere1D.LazyHolder
Holder for the instance.
|
static class |
Sphere1D.NoSubSpaceException
Specialized exception for inexistent sub-space.
|
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
Serializable version identifier.
|
Modifier | Constructor and Description |
---|---|
private |
Sphere1D()
Private constructor for the singleton.
|
Modifier and Type | Method and Description |
---|---|
int |
getDimension()
Get the dimension of the space.
|
static Sphere1D |
getInstance()
Get the unique instance.
|
Space |
getSubSpace()
Get the n-1 dimension subspace of this space.
|
private java.lang.Object |
readResolve()
Handle deserialization of the singleton.
|
private static final long serialVersionUID
public static Sphere1D getInstance()
public int getDimension()
getDimension
in interface Space
public Space getSubSpace() throws Sphere1D.NoSubSpaceException
As the 1-dimension sphere does not have proper sub-spaces,
this method always throws a Sphere1D.NoSubSpaceException
getSubSpace
in interface Space
Sphere1D.NoSubSpaceException
- in all casesSpace.getDimension()
private java.lang.Object readResolve()