net.dontdrinkandroot.visualization.layout.graph

## Class AbstractCircularLayout<V,E>

- java.lang.Object
- - net.dontdrinkandroot.visualization.layout.AbstractLayout<edu.uci.ics.jung.graph.Graph<V,E>>
  - - net.dontdrinkandroot.visualization.layout.graph.AbstractCircularLayout<V,E>

All Implemented Interfaces:
  Layout<edu.uci.ics.jung.graph.Graph<V,E>>

Direct Known Subclasses:
  ForceCircularLayout, SiftingCircularLayout, SiftingCircularLayout2, SiftingCircularLayout3

    public abstract class AbstractCircularLayout<V,E>
    extends AbstractLayout<edu.uci.ics.jung.graph.Graph<V,E>>

### Field Summary

Fields
`protected Map<E,VisualItem>` `edgeMap`
`protected CenterEdgeRouter2<V,E>` `edgeRouter`
`protected edu.uci.ics.jung.graph.Graph<V,E>` `g`
`protected org.apache.commons.collections15.Transformer<V,VisualItem>` `itemTransformer`
`protected org.slf4j.Logger` `logger`
`protected double` `offset`
`protected Map<V,VisualItem>` `vertexMap`

### Fields inherited from class net.dontdrinkandroot.visualization.layout.AbstractLayout

`desiredBounds, layouted`

### Constructor Summary

Constructors
Constructor and Description
`AbstractCircularLayout(edu.uci.ics.jung.graph.Graph<V,E> g, org.apache.commons.collections15.Transformer<V,VisualItem> itemTransformer)`

### Method Summary

Methods
`protected boolean` `before(int uPos, int vPos, int startPos, int numVertices)`
`protected boolean` `crosses(E e1, E e2, List<V> vertexList)`
`protected List<V>` `doForcePlacement(List<V> vertexList)`
`protected List<V>` `doForcePlacementRound(List<V> vertexList)`
`protected List<V>` `doInitialPlacement()`
`protected abstract List<V>` `doLayout()`
`protected List<V>` `doRandomPlacement()`
`protected int` `getCrossingChange(V v1, V v2, List<V> layout)`
`EdgeRouter<V,E>` `getEdgeRouter()`
`protected int` `getNumCrossings(int v1Pos, int v2Pos, List<Integer> v1NeighborPositions, List<Integer> v2NeighborPositions, int numVertices)`
`protected int` `getNumCrossings(List<V> vertexList)`
`protected int` `getNumCrossings(V v1, V v2, List<V> vertexList)`
`double` `getOffset()`
`protected List<Integer>` `getPositionList(Collection<V> vertices, List<V> layout, int ignorePos)`
`protected List<Integer>` `getSortedPositionList(List<V> layout, Collection<V> vertices, int startPos, int ignorePos)`
`void` `layout()`
`static int` `modulo(int i1, int i2)`
`void` `render(Graphics2D g2d)`
`void` `setOffset(double offset)`

### Methods inherited from class net.dontdrinkandroot.visualization.layout.AbstractLayout

`getBounds, isLayouted, setlayouted`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### g

    protected final edu.uci.ics.jung.graph.Graph<V,E> g

#### itemTransformer

    protected final org.apache.commons.collections15.Transformer<V,VisualItem> itemTransformer

#### edgeRouter

    protected CenterEdgeRouter2<V,E> edgeRouter

#### vertexMap

    protected Map<V,VisualItem> vertexMap

#### edgeMap

    protected Map<E,VisualItem> edgeMap

#### offset

    protected double offset

#### logger

    protected final org.slf4j.Logger logger

### Constructor Detail

#### AbstractCircularLayout

    public AbstractCircularLayout(edu.uci.ics.jung.graph.Graph<V,E> g,
                          org.apache.commons.collections15.Transformer<V,VisualItem> itemTransformer)

### Method Detail

#### layout

    public void layout()
                throws LayoutException

Throws:
  `LayoutException`

#### doLayout

    protected abstract List<V> doLayout()

#### getOffset

    public double getOffset()

#### setOffset

    public void setOffset(double offset)

#### getNumCrossings

    protected int getNumCrossings(V v1,
                      V v2,
                      List<V> vertexList)

#### getEdgeRouter

    public EdgeRouter<V,E> getEdgeRouter()

#### before

    protected boolean before(int uPos,
                 int vPos,
                 int startPos,
                 int numVertices)

#### getCrossingChange

    protected int getCrossingChange(V v1,
                        V v2,
                        List<V> layout)

#### getNumCrossings

    protected int getNumCrossings(int v1Pos,
                      int v2Pos,
                      List<Integer> v1NeighborPositions,
                      List<Integer> v2NeighborPositions,
                      int numVertices)

#### crosses

    protected boolean crosses(E e1,
                  E e2,
                  List<V> vertexList)

#### doInitialPlacement

    protected List<V> doInitialPlacement()

#### render

    public void render(Graphics2D g2d)

#### modulo

    public static int modulo(int i1,
             int i2)

#### doForcePlacement

    protected List<V> doForcePlacement(List<V> vertexList)

#### doForcePlacementRound

    protected List<V> doForcePlacementRound(List<V> vertexList)

#### getNumCrossings

    protected int getNumCrossings(List<V> vertexList)

#### getSortedPositionList

    protected List<Integer> getSortedPositionList(List<V> layout,
                                      Collection<V> vertices,
                                      int startPos,
                                      int ignorePos)

#### getPositionList

    protected List<Integer> getPositionList(Collection<V> vertices,
                                List<V> layout,
                                int ignorePos)

#### doRandomPlacement

    protected List<V> doRandomPlacement()