|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AbstractGraph | +--AbstractYutsis
Abstract implementation of a (cubic) graph allowing the
graph transformations used to reduce a YutsisGraph
by implementing the Graph
interface. A ChangeListener
can be registered to listen to ChangeEvents fired when the
underlying cubic graph is structurally changed, i.e. a change
reflected in the Cycle Vector Space spanned by a cycle base
of the graph.
Graph
Field Summary | |
static int |
BRAKET
Int representing the BRAKET format in which the graphs are stored in a file: this represents the well known braket notation e.g. |
static int |
EDGELIST
Int representing the EDGELIST format in which the graphs are stored in a file: |
static int |
YTS
Int representing the YTS format in which the graphs are stored in a file: the first line contains the (cubic) order (n) of the graph, followed by 2n lines with three labels representing the couplings in the nodes. |
Constructor Summary | |
AbstractYutsis()
|
Method Summary | |
java.lang.String |
addIntermediateLabels(java.lang.String braket)
Adds intermediate labels to a BRAKET representation. |
static int |
guessFileFormat(java.lang.String filename)
Guesses the format of the file by looking at the first two lines. |
void |
interchange(int node1,
int node2,
int icnode1,
int icnode2)
Interchange on the edge (node1, node2) interchanging
the edges (node1, icnode1) and
(node2, icnode2) . |
boolean |
intermediateLabelsPresent(java.lang.String braket)
Returns true if the intermediate labels APPEAR to be present, false otherwise. |
int |
nrOfEdges()
Implementation of the method Graph.nrOfEdges() as
specified by the Graph interface. |
void |
removeTriangle(int node1,
int node2,
int node3)
Removes the triangle node1, node2, node3 . |
boolean |
triangularDelta()
True if the graph represents a triangular delta, false otherwise. |
boolean |
triangularDelta(int[] td)
True if the graph represents a triangular delta between node td[0] and td[1] , false otherwise. |
boolean |
triangularDelta(int node1,
int node2)
True if the graph represents a triangular delta between node node1 and node2 , false otherwise. |
Methods inherited from class AbstractGraph |
addChangeListener, clone, connected, fireStateChanged, gmlEdgeLabels, isTree, removeChangeListener, toGml, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface Yutsis |
bubble, clone, interchange, removeBubble, removeTriangle, triangle, triangles |
Methods inherited from interface Graph |
addChangeListener, connected, first, isRemoved, isTree, last, neighbors, nodeIterator, nrOfNodes, order, removeChangeListener, toGml |
Field Detail |
public static final int YTS
public static final int BRAKET
<(j1,j2)j12|(j2,j1)j12>.
public static final int EDGELIST
<nrOfnodes> <nrOfEdges> <edge> <edge> ... <edge>With <edge> = node1 node2, the edges may be distributed over several lines, but linebreaks are not allowed between two nodes of the same edge. No syntax checks are performed.
Constructor Detail |
public AbstractYutsis()
Method Detail |
public static int guessFileFormat(java.lang.String filename) throws java.io.IOException
filename
- the filename of the file
java.io.IOException
public boolean intermediateLabelsPresent(java.lang.String braket)
braket
- the String to be checked if intermediate labels
are present
public java.lang.String addIntermediateLabels(java.lang.String braket)
braket
- the BRAKET representation
public int nrOfEdges()
Graph.nrOfEdges()
as
specified by the Graph
interface.
nrOfEdges
in interface Graph
AbstractGraph
,
Graph
public void interchange(int node1, int node2, int icnode1, int icnode2)
(node1, node2)
interchanging
the edges (node1, icnode1)
and
(node2, icnode2)
.
interchange
in interface Yutsis
node1
- first node of the edge on which the interchange
is performednode2
- second node of the edge on which the interchange
is performedicnode1
- neighbor of node1 to be interchanged with icnode2icnode2
- neighbor of node2 to be interchanged with icnode1public void removeTriangle(int node1, int node2, int node3)
node1, node2, node3
.
removeTriangle
in interface Yutsis
node1
- first node of the triangle to be removednode2
- second node of the triangle to be removednode3
- third node of the triangle to be removedpublic boolean triangularDelta()
triangularDelta
in interface Yutsis
public boolean triangularDelta(int[] td)
td[0]
and td[1]
, false otherwise.
triangularDelta
in interface Yutsis
td
- the nodes of the triangular delta as an array
public boolean triangularDelta(int node1, int node2)
node1
and node2
, false otherwise.
triangularDelta
in interface Yutsis
node1
- first node of the triangular delta to be formattednode2
- second node of the triangular delta to be formatted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |