uchicago.src.sim.topology
Interface RelationTopology

All Known Subinterfaces:
Graph, ModifyableTopology
All Known Implementing Classes:
AbstractDiscrete2DTopology, AbstractGraph, AbstractNeighborhood, AbstractObject2DTopology, AbstractObject3DTopology, DefaultModifyableTopology, OccupationTopology

public interface RelationTopology

This represents a basic topology. It is not modifyable, so the relationships must be defined elsewhere. All this interface does, is all access to those relationships.

Version:
$Revision: 1.5 $
Author:
Tom Howe

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(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.
 

Method Detail

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:

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:

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:

setRelationType

public void setRelationType(java.lang.String type)
Set the name for this type of relation.

Parameters:
type -