gzz.impl
Class SimpleDim

gzz.Dim gzz.diff.DeltaDim gzz.impl.AbstractDim gzz.impl.SimpleDim gzz.impl.NormalDim ../../../Gzz_Backend.gen.html#impldims impldims_small
java.lang.Object
  |
  +--gzz.impl.AbstractDim
        |
        +--gzz.impl.SimpleDim
All Implemented Interfaces:
Dim
Direct Known Subclasses:
NormalDim

public class SimpleDim
extends AbstractDim

A simple, modifiable ZZ dimension.


Nested Class Summary
protected  class SimpleDim.DirMap
          A map in one direction.
static class SimpleDim.SimpleDimManager
          A DimManager that creates a SimpleDim for any given Id.
 
Field Summary
static boolean dbg
           
static java.lang.String rcsid
           
 
Fields inherited from class gzz.impl.AbstractDim
id, space
 
Constructor Summary
SimpleDim(Space space, ObsTrigger trigger)
          Deprecated. Must provide id
SimpleDim(Space space, java.lang.String id, ObsTrigger trigger)
           
 
Method Summary
 void connect(Cell c, Cell d)
          Connect the two cells in this dimension, in order.
 void disconnect(Cell c, int dir)
          Disconnect the cell in the given direction.
 java.util.Set getHeadcells()
          Get the set of all non-trivial headcells on this dimension.
 java.util.Set getNegsides()
          Get the set of cells that have posward connections.
 boolean isCircularHead(Cell c, Obs o)
          Whether the given cell is a headcell of a circular rank on this dimension.
 Cell s(Cell c, int steps, Obs o)
          Get another cell steps steps on the dimension from c.
 
Methods inherited from class gzz.impl.AbstractDim
canonicalizeCells, connect, excise, exciseRange, getId, getSpace, h, h, h, hop, insert, insertRank, iterator, s, s
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rcsid

public static final java.lang.String rcsid
See Also:
Constant Field Values

dbg

public static final boolean dbg
See Also:
Constant Field Values
Constructor Detail

SimpleDim

public SimpleDim(Space space,
                 java.lang.String id,
                 ObsTrigger trigger)

SimpleDim

public SimpleDim(Space space,
                 ObsTrigger trigger)
Deprecated. Must provide id

DEPRECATED.

Method Detail

s

public Cell s(Cell c,
              int steps,
              Obs o)
Description copied from interface: Dim
Get another cell steps steps on the dimension from c.

Specified by:
s in interface Dim
Specified by:
s in class AbstractDim
Parameters:
c - The cell
steps - Number of steps, can be negative.

connect

public void connect(Cell c,
                    Cell d)
             throws gzz.errors.ZZAlreadyConnectedException
Description copied from interface: Dim
Connect the two cells in this dimension, in order. This method is not allowed to break existing connections.

Specified by:
connect in interface Dim
Specified by:
connect in class AbstractDim
Throws:
gzz.errors.ZZAlreadyConnectedException - If one of the cells is already connected.

disconnect

public void disconnect(Cell c,
                       int dir)
Description copied from interface: Dim
Disconnect the cell in the given direction. It is not an error to disconnect something that is not connected.

Specified by:
disconnect in interface Dim
Specified by:
disconnect in class AbstractDim

isCircularHead

public boolean isCircularHead(Cell c,
                              Obs o)
Description copied from interface: Dim
Whether the given cell is a headcell of a circular rank on this dimension.

Specified by:
isCircularHead in interface Dim
Specified by:
isCircularHead in class AbstractDim

getHeadcells

public java.util.Set getHeadcells()
Description copied from interface: Dim
Get the set of all non-trivial headcells on this dimension. Non-trivial headcells are those with a posward connection, i.e. cells that aren't connected on this dimension aren't returned by this method.


getNegsides

public java.util.Set getNegsides()
Description copied from interface: Dim
Get the set of cells that have posward connections. Only the 'real' cells which should be saved to the file, merged etc., not connections inferred by the computer.