public class Space extends Object implements Serializable
| Constructor and Description |
|---|
Space(SpaceDimension[] dimensions)
Initializes the space.
|
| Modifier and Type | Method and Description |
|---|---|
int |
dimensions()
Returns the number of dimensions of this space.
|
SpaceDimension |
getDimension(int dimension)
Returns the specified dimension.
|
Point<Integer> |
getLocations(Point<Object> values)
Returns the locations for the given values in the various dimensions.
|
Point<Object> |
getValues(Point<Integer> locations)
Returns the double values (or list values) for the given position.
|
boolean |
isOnBorder(Point<?> points)
checks whether the given locations/values are on the border of the space.
|
Enumeration<Point<Integer>> |
points()
returns an Enumeration over all points.
|
int |
size()
Returns the size of the space.
|
Space |
subspace(Point<Integer> center)
Returns a subspace around the given point, with just one more
neighbor left and right on each dimension.
|
String |
toString()
Returns a string representation of the space.
|
Enumeration<Point<Object>> |
values()
returns an Enumeration over all values.
|
public Space(SpaceDimension[] dimensions)
dimensions - the dimensions of the spacepublic int dimensions()
public SpaceDimension getDimension(int dimension)
dimension - the dimension indexpublic Point<Object> getValues(Point<Integer> locations)
locations - the location to get the double values forpublic Point<Integer> getLocations(Point<Object> values)
values - the double values to get the locations forpublic boolean isOnBorder(Point<?> points)
points - the locations/values to checkpublic Space subspace(Point<Integer> center)
center - the center of the new "universe" ;-)public int size()
public Enumeration<Point<Integer>> points()
public Enumeration<Point<Object>> values()
Copyright © 2021 University of Waikato, Hamilton, NZ. All Rights Reserved.