uchicago.src.sim.topology.space2
Class MooreTopology

java.lang.Object
  extended byuchicago.src.sim.topology.space2.AbstractDiscrete2DTopology
      extended byuchicago.src.sim.topology.space2.MooreTopology
All Implemented Interfaces:
RelationTopology

public class MooreTopology
extends AbstractDiscrete2DTopology

Created by IntelliJ IDEA. User: thowe Date: Jun 16, 2003 Time: 4:41:53 PM To change this template use Options | File Templates.


Field Summary
static java.lang.String type
           
 
Fields inherited from class uchicago.src.sim.topology.space2.AbstractDiscrete2DTopology
comparator, space, torus
 
Constructor Summary
MooreTopology(Discrete2DSpace space)
           
 
Method Summary
 double distance(java.lang.Object element1, java.lang.Object element2)
          Gets the distance between two objects in this topology.
 java.util.List getRelations(int x, int y, int[] extents, boolean returnNulls)
           
 java.util.List getRelations(java.lang.Object element)
          Get all of the relationships that the given element has with other elements.
 java.util.List getRelations(java.lang.Object element, double range)
          Gets all of the Objects within a given range.
 java.lang.String getRelationType()
          Get the type of relationship/topology that is represented by this Class.
 void setRelationType(java.lang.String type)
          Set the name for this type of relation.
 
Methods inherited from class uchicago.src.sim.topology.space2.AbstractDiscrete2DTopology
compareMax, compareMin, findMaximum, findMinimum, setComparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public static java.lang.String type
Constructor Detail

MooreTopology

public MooreTopology(Discrete2DSpace space)
Method Detail

getRelations

public java.util.List getRelations(int x,
                                   int y,
                                   int[] extents,
                                   boolean returnNulls)
Specified by:
getRelations in class AbstractDiscrete2DTopology

getRelations

public java.util.List getRelations(java.lang.Object element)
Get all of the relationships that the given element has with other elements.

Parameters:
element -
Returns:

getRelationType

public java.lang.String getRelationType()
Get the type of relationship/topology that is represented by this Class. For example, if this represents a VonNeumann topology, this should return the String "VON_NEUMANN".

Returns:

setRelationType

public void setRelationType(java.lang.String type)
Description copied from interface: RelationTopology
Set the name for this type of relation.

Parameters:
type -

getRelations

public java.util.List getRelations(java.lang.Object element,
                                   double range)
Gets all of the Objects within a given range.

Parameters:
element -
range -
Returns:

distance

public double distance(java.lang.Object element1,
                       java.lang.Object element2)
Gets the distance between two objects in this topology. This could be either spatial distance, network distance or any other kind of well defined metric distance.

Parameters:
element1 -
element2 -
Returns: