org.apache.commons.math3.geometry.euclidean.oned
Class Euclidean1D

java.lang.Object
  extended by org.apache.commons.math3.geometry.euclidean.oned.Euclidean1D
All Implemented Interfaces:
Serializable, Space

public class Euclidean1D
extends Object
implements Serializable, Space

This class implements a one-dimensional space.

Since:
3.0
Version:
$Id: Euclidean1D.java 1244107 2012-02-14 16:17:55Z erans $
See Also:
Serialized Form

Nested Class Summary
private static class Euclidean1D.LazyHolder
          Holder for the instance.
 
Field Summary
private static long serialVersionUID
          Serializable version identifier.
 
Constructor Summary
private Euclidean1D()
          Private constructor for the singleton.
 
Method Summary
 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  Object readResolve()
          Handle deserialization of the singleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serializable version identifier.

See Also:
Constant Field Values
Constructor Detail

Euclidean1D

private Euclidean1D()
Private constructor for the singleton.

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 interface Space
Returns:
dimension of the space

getSubSpace

public Space getSubSpace()
                  throws MathUnsupportedOperationException
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 MathUnsupportedOperationException

Specified by:
getSubSpace in interface Space
Returns:
nothing
Throws:
MathUnsupportedOperationException - in all cases
See Also:
Space.getDimension()

readResolve

private Object readResolve()
Handle deserialization of the singleton.

Returns:
the singleton instance


Copyright (c) 2003-2013 Apache Software Foundation