at.tuwien.ifs.somtoolbox.util.growingCellStructures
Class GrowingCellTetraheder

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.util.growingCellStructures.GrowingCellTetraheder

public class GrowingCellTetraheder
extends Object

A Tetraheder of 3 Cellstructures (for efficient adding and removing of units)

Version:
$Id: GrowingCellTetraheder.java 3585 2010-05-21 10:33:21Z mayer $
Author:
Johannes Inführ, Andreas Zweng

Field Summary
private  GrowingCellUnit[] cellUnits
          The Units that belong to this Tetraheder
 
Constructor Summary
GrowingCellTetraheder(GrowingCellUnit c1, GrowingCellUnit c2, GrowingCellUnit c3)
          Std Constructor, creates Tetraheder with Units c1,c2 and c3 (and connects them to this tetraheder)
 
Method Summary
 boolean contains(GrowingCellUnit unit)
           
 boolean equals(Object o)
           
 GrowingCellUnit[] getCellUnits()
           
 GrowingCellUnit getRemainingUnit(GrowingCellUnit u1, GrowingCellUnit u2)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cellUnits

private GrowingCellUnit[] cellUnits
The Units that belong to this Tetraheder

Constructor Detail

GrowingCellTetraheder

public GrowingCellTetraheder(GrowingCellUnit c1,
                             GrowingCellUnit c2,
                             GrowingCellUnit c3)
Std Constructor, creates Tetraheder with Units c1,c2 and c3 (and connects them to this tetraheder)

Parameters:
c1 - Unit1
c2 - Unit2
c3 - Unit3
Method Detail

getCellUnits

public GrowingCellUnit[] getCellUnits()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

contains

public boolean contains(GrowingCellUnit unit)
Parameters:
unit - the Unit
Returns:
true if this Tetraeder connects unit

getRemainingUnit

public GrowingCellUnit getRemainingUnit(GrowingCellUnit u1,
                                        GrowingCellUnit u2)
Parameters:
u1 - Unit1
u2 - Unit2
Returns:
Unit !=u1 and !=u2