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