## org.ascape.model.space
Class SubGraph

    java.lang.Object
      org.ascape.model.space.CollectionSpace
          org.ascape.model.space.Discrete
              org.ascape.model.space.Graph
                  org.ascape.model.space.SubGraph

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, Space, SubSpace, RandomFunctions

    public class SubGraph

extends Graph
implements SubSpace

This is an unsual version of the SubSpace - it's a Graph, where the members also exist in a Continuous Space. Written for use in the NAS model. At some point, this should probably be made more general.

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.ascape.model.space.CollectionSpace
`CollectionSpace.ClosestDataPoint, CollectionSpace.ConditionalIterator, CollectionSpace.CSIterator, CollectionSpace.CSMutableIterator, CollectionSpace.ListMutableRandomIterator, CollectionSpace.ListRandomIterator, CollectionSpace.MutableSubIterator, CollectionSpace.SubIterator`

Field Summary

Fields inherited from class org.ascape.model.space.Discrete
`performanceWarning`

Fields inherited from class org.ascape.model.space.CollectionSpace
`collection, ESTIMATED_MAXIMUM_SIZE, extent, geometry`

Constructor Summary
`SubGraph()` Constructs an arbitrary directed graph.

Method Summary
`boolean` `add(java.lang.Object o, boolean isParent)` Adds the supplied object (assumed to be an agent) to this graph.
`Space` `getSuperSpace()` Gets the super space.
`void` `setSuperSpace(Space superSpace)` Sets the super space.

Methods inherited from class org.ascape.model.space.Graph
`addNeighbor, addNeighbor, addNeighborSafe, calculateNeighbors, clear, clearNeighbors, findCellAway, findCellToward, findNearest, findNeighbors, getAdjacencyMap, getNeighborsFor, initialize, isNeighbor, neighborIterator, remove, removeNeighbor, replaceNeighbor, setAdjacencyMap, setNeighborsFor, withinIterator`

Methods inherited from class org.ascape.model.space.Discrete

`bfsWithinIterator, calculateDistance, calculateDistance, findAvailable, findAvailable, findCellAwayBFS, findCellTowardBFS, findNearestAvailable, findNearestBFS, findOccupants, findOccupants, findRandomAvailable, findRandomAvailable, findRandomAvailable, findRandomAvailableNeighbor, findRandomNeighbor, findRandomNeighbor, findRandomUnoccupiedCell, findRandomUnoccupiedCell, findWithinDefault, getCells, getCellsNearDefault, getDistance, getMaximumRank, getSize`

Methods inherited from class org.ascape.model.space.CollectionSpace

`add, addAll, calculateDistance, clone, conditionalIterator, conditionalIterator, construct, contains, containsAll, countWithin, createOrder, createSpatialConditional, deleteSweep, filter, find, findMaximum, findMaximum, findMaximumWithin, findMinimum, findMinimum, findMinimumWithin, findNearest, findRandom, findRandom, findRandom, findRandom, findRandomCoordinate, findRandomWithin, findWithin, get, getContext, getExtent, getGeometry, getRandom, hasWithin, isDeleteSweepNeeded, isEmpty, isMutable, isPeriodic, iterator, iteratorCount, iteratorToList, moveAway, moveToward, newLocation, newLocation, populate, randomInRange, randomInRange, randomIs, randomizeOrder, randomToLimit, removeAll, retainAll, safeIterator, safeIterator, safeIterators, safeRandomIterator, set, setContext, setExtent, setExtent, setGeometry, setPeriodic, setRandom, setSize, size, toArray, toArray, toList`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Collection
`equals, hashCode`

Constructor Detail

### SubGraph

    public SubGraph()

  Constructs an arbitrary directed graph.

Method Detail

### add

    public boolean add(java.lang.Object o,
                       boolean isParent)

  Adds the supplied object (assumed to be an agent) to this graph.

  Specified by:
    `add` in interface `Space`
  Overrides:
    `add` in class `Graph`
  Parameters:
    `o` - the agent to add
    `isParent` - the is parent
  Returns:
    true, if add

### getSuperSpace

    public Space getSuperSpace()

  Description copied from interface: `SubSpace`
  Gets the super space.

  Specified by:
    `getSuperSpace` in interface `SubSpace`
  Returns:
    the super space

### setSuperSpace

    public void setSuperSpace(Space superSpace)

  Description copied from interface: `SubSpace`
  Sets the super space.

  Specified by:
    `setSuperSpace` in interface `SubSpace`
  Parameters:
    `superSpace` - the new super space