Class Sphere1D
- java.lang.Object
-
- org.apache.commons.math3.geometry.spherical.oned.Sphere1D
-
- All Implemented Interfaces:
java.io.Serializable,Space
public class Sphere1D extends java.lang.Object implements java.io.Serializable, Space
This class implements a one-dimensional sphere (i.e. a circle).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.
- Since:
- 3.3
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSphere1D.LazyHolderHolder for the instance.static classSphere1D.NoSubSpaceExceptionSpecialized exception for inexistent sub-space.
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDSerializable version identifier.
-
Constructor Summary
Constructors Modifier Constructor Description privateSphere1D()Private constructor for the singleton.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDimension()Get the dimension of the space.static Sphere1DgetInstance()Get the unique instance.SpacegetSubSpace()Get the n-1 dimension subspace of this space.private java.lang.ObjectreadResolve()Handle deserialization of the singleton.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serializable version identifier.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static Sphere1D getInstance()
Get the unique instance.- Returns:
- the unique instance
-
getDimension
public int getDimension()
Get the dimension of the space.- Specified by:
getDimensionin interfaceSpace- Returns:
- dimension of the space
-
getSubSpace
public Space getSubSpace() throws Sphere1D.NoSubSpaceException
Get the n-1 dimension subspace of this space.As the 1-dimension sphere does not have proper sub-spaces, this method always throws a
Sphere1D.NoSubSpaceException- Specified by:
getSubSpacein interfaceSpace- Returns:
- nothing
- Throws:
Sphere1D.NoSubSpaceException- in all cases- See Also:
Space.getDimension()
-
readResolve
private java.lang.Object readResolve()
Handle deserialization of the singleton.- Returns:
- the singleton instance
-
-