etomica.space
Interface ISpace

All Known Implementing Classes:
Space, Space1D, Space2D, Space3D

public interface ISpace


Method Summary
 int D()
          The dimension of this space.
 double[] makeArrayD(double d)
          Returns an array of dimension D, with each element equal to the given value.
 int[] makeArrayD(int i)
          Returns an array of dimension D, with each element equal to the given value.
 IOrientation makeOrientation()
          Constructs and returns a new Orientation appropriate to the space.
 RotationTensor makeRotationTensor()
          Constructs and returns a new RotationTensor appropriate to the space.
 Tensor makeTensor()
          Constructs and returns a new Tensor appropriate to the space.
 IVectorMutable makeVector()
          Constructs and returns a new Vector appropriate to the space.
 IVectorMutable makeVector(double[] a)
           
 IVectorMutable makeVector(int[] k)
           
 IVectorMutable[] makeVectorArray(int n)
          Instance methods that makes and returns an array of vectors having the given number of elements.
 double powerD(double a)
          Returns the given value raised to the Dth power, where D is the dimension of the space.
 int powerD(int a)
          Returns the given value raised to the Dth power, where D is the dimension of the space.
 double rootD(double a)
          Returns the given value raised to the power 1/D, where D is the dimension of the space.
 double sphereArea(double r)
          Returns the surface "area" of the "sphere" defined in the D-dimensional space.
 double sphereVolume(double r)
          Returns the "volume" of the "sphere" defined in the D-dimensional space.
 

Method Detail

D

int D()
The dimension of this space.


rootD

double rootD(double a)
Returns the given value raised to the power 1/D, where D is the dimension of the space.


powerD

int powerD(int a)
Returns the given value raised to the Dth power, where D is the dimension of the space.


powerD

double powerD(double a)
Returns the given value raised to the Dth power, where D is the dimension of the space.


makeVector

IVectorMutable makeVector()
Constructs and returns a new Vector appropriate to the space.


makeVector

IVectorMutable makeVector(double[] a)

makeVector

IVectorMutable makeVector(int[] k)

makeOrientation

IOrientation makeOrientation()
Constructs and returns a new Orientation appropriate to the space.


makeTensor

Tensor makeTensor()
Constructs and returns a new Tensor appropriate to the space.


makeRotationTensor

RotationTensor makeRotationTensor()
Constructs and returns a new RotationTensor appropriate to the space.


makeArrayD

int[] makeArrayD(int i)
Returns an array of dimension D, with each element equal to the given value.


makeArrayD

double[] makeArrayD(double d)
Returns an array of dimension D, with each element equal to the given value.


sphereVolume

double sphereVolume(double r)
Returns the "volume" of the "sphere" defined in the D-dimensional space. In 1-D, this is twice the radius; in 2-D the area of the circle; in 3-D the volume of the sphere.

Parameters:
r - the radius
Returns:
the volume

sphereArea

double sphereArea(double r)
Returns the surface "area" of the "sphere" defined in the D-dimensional space. In 1-D this is zero; in 2-D the circumference of the circle; in 3-D the surface area of the sphere.

Parameters:
r - the radius
Returns:
the area

makeVectorArray

IVectorMutable[] makeVectorArray(int n)
Instance methods that makes and returns an array of vectors having the given number of elements.

Parameters:
n - number of vectors in the returned array
Returns:
an array of n new vectors made by the space instance