Top Description Inners Fields Constructors Methods
org.apache.commons.math3.geometry.euclidean.oned

public Class Euclidean1D

extends Object
implements Serializable, Space
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.geometry.Space, java.io.Serializable
Imports
java.io.Serializable, org.apache.commons.math3.exception.MathUnsupportedOperationException, org.apache.commons.math3.exception.util.LocalizedFormats, org.apache.commons.math3.geometry.Space

This class implements a one-dimensional space.
Since
3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
Euclidean1D.LazyHolder

Holder for the instance.

public static class
Euclidean1D.NoSubSpaceException

Specialized exception for inexistent sub-space.

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Serializable version identifier.

Constructor Summary

AccessConstructor and Description
private
Euclidean1D()

Private constructor for the singleton.

Method Summary

Modifier and TypeMethod and Description
public int
getDimension()

Implements org.apache.commons.math3.geometry.Space.getDimension.

Get the dimension of the space.

public static Euclidean1D

Returns:

the unique instance
getInstance
()

Get the unique instance.

public Space

Returns:

nothing
getSubSpace
()

Implements org.apache.commons.math3.geometry.Space.getSubSpace.

Get the n-1 dimension subspace of this space.

private Object

Returns:

the singleton instance
readResolve
()

Handle deserialization of the singleton.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable version identifier.

Constructor Detail

Euclidean1Dback to summary
private Euclidean1D()

Private constructor for the singleton.

Method Detail

getDimensionback to summary
public int getDimension()

Implements org.apache.commons.math3.geometry.Space.getDimension.

Doc from org.apache.commons.math3.geometry.Space.getDimension.

Get the dimension of the space.

Returns:int

dimension of the space

getInstanceback to summary
public static Euclidean1D getInstance()

Get the unique instance.

Returns:Euclidean1D

the unique instance

getSubSpaceback to summary
public Space getSubSpace() throws NoSubSpaceException

Implements org.apache.commons.math3.geometry.Space.getSubSpace.

Doc from org.apache.commons.math3.geometry.Space.getSubSpace.

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 NoSubSpaceException

Returns:Space

nothing

Exceptions
NoSubSpaceException:
in all cases
readResolveback to summary
private Object readResolve()

Handle deserialization of the singleton.

Returns:Object

the singleton instance

org.apache.commons.math3.geometry.euclidean.oned back to summary

private Class Euclidean1D.LazyHolder

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.commons.math3.geometry.euclidean.oned.Euclidean1D.LazyHolder

Holder for the instance.

We use here the Initialization On Demand Holder Idiom.

Field Summary

Modifier and TypeField and Description
private static final Euclidean1D
INSTANCE

Cached field instance.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final Euclidean1D INSTANCE

Cached field instance.

Constructor Detail

LazyHolderback to summary
private LazyHolder()
org.apache.commons.math3.geometry.euclidean.oned back to summary

public Class Euclidean1D.NoSubSpaceException

extends MathUnsupportedOperationException
Class Inheritance

Specialized exception for inexistent sub-space.

This exception is thrown when attempting to get the sub-space of a one-dimensional space

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
NoSubSpaceException()

Simple constructor.

Method Summary

Inherited from org.apache.commons.math3.exception.MathUnsupportedOperationException:
getContextgetLocalizedMessagegetMessage

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.commons.math3.exception.MathUnsupportedOperationException.serialVersionUID.

Serializable UID.

Constructor Detail

NoSubSpaceExceptionback to summary
public NoSubSpaceException()

Simple constructor.