|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AbstractGraph | +--AbstractYutsis | +--YutsisGraph
Implementation of the abstract AbstractYutsis
class
representing a Yutsis graph in order to generate the summation
formula in terms of 6j-coefficients for the general angular
momentum recoupling coefficient (or 3nj-coefficents)
represented by the couplings in this Yutsis graph. The main
function of this class is an interactive text interface which
allows the user to get information about the YutsisGraph and the
reduction process.
AbstractYutsis
,
NodeIterator
,
GenRecoupCoeff
Field Summary |
Fields inherited from class AbstractYutsis |
BRAKET, EDGELIST, YTS |
Constructor Summary | |
YutsisGraph(java.io.BufferedReader input)
Constructor creating a YutsisGraph from a BufferedReader in YTS format. |
|
YutsisGraph(java.io.BufferedReader input,
int format)
Contructor creating a YutsisGraph from a BufferedReader in given format. |
|
YutsisGraph(java.lang.String braket)
Construcs a new YutsisGraph object from the braket in the String. |
|
YutsisGraph(YutsisGraph y)
Constructs an exact copy of this YutsisGraph. |
Method Summary | |
java.lang.String |
braket()
Returns the braket notation of the original YutsisGraph. |
int[] |
bubble()
Implementation of the abstract method Yutsis.bubble() . |
java.lang.Object |
clone()
Returns an exact copy of this YutsisGraph, as specified by the Cloneable interface. |
int |
cubicOrder()
Return the original (cubic) order of this Cubic graph. |
java.lang.String[] |
edgeLabels(int node)
Returns the labels of the edges coupled in the node node . |
Edge[] |
edges(int node)
Returns (a copy) of the edges coupled in the node node . |
Edge[] |
edges(int[] nodes)
Returns the edges between nodes[0] and
nodes[1] (max 3) as an array of edges. |
Edge[] |
edges(int node1,
int node2)
Returns the edges between node1 and
node2 (max 3) as a Vector or null if
one of the nodes is removed. |
NodeIterator |
first()
Returns an NodeIterator over the nodeset starting at the node
with lowest label as specified by the
Graph interface. |
GenRecoupCoeff |
genRecoupCoeff()
Returns the General Recoupling Coefficient corresponding with the current state of this YutsisGraph. |
java.lang.String[] |
gmlEdgeLabels(int i)
Returns the edge label to be used for saving the Graph in GML-format; overloads AbstractGraph.gmlEdgeLabel. |
static void |
interactive(YutsisGraph y)
This function presents an interactive text interface allowing the user to get information about this YutsisGraph and the reduction process. |
void |
interchange(int[] nodes,
int[] icnodes)
Implementation of the abstract Yutsis.interchange(int
[], int[] ) method. |
void |
invertEdge(int node,
Edge e)
Generates the phase factor (-1)^(2j), with j the label of the edge with endpoint node and inverts the edge
afterwards. |
void |
invertSign(int node)
Reverses the sign of node . |
boolean |
isNewLabel(java.lang.String label)
True if this label did not appear in the original graph, if true this label will yield a summation over its complete domain. |
boolean |
isRemoved(int node)
Implementation of the Graph.isRemoved(int)
method. |
NodeIterator |
last()
Returns an NodeIterator over the nodeset starting at the node
with highest label in some ordening as specified by the
Graph interface. |
protected void |
log(java.lang.String tolog)
Write the String to the logstream. |
static void |
main(java.lang.String[] args)
This program constructs the YutsisGraph specified by the first argument and presents an interactive interface allowing the user to get information about the YutsisGraph and the reductionprocess. |
int |
n()
Returns the (current) (cubic) order of this cubic graph. |
int[] |
neighbors(int node)
Returns the neighbors of node or null
if the node is removed from the graph as specified by the
Graph interface. |
NodeIterator |
nodeIterator(int node)
Returns an NodeIterator which will return node
by a NodeIterator.next() call as specified by the
Graph interface. |
int |
nrOfNodes()
Returns the (current) number of nodes of this cubic graph as specified by the Graph interface. |
int |
order()
Returns the original order (number or nodes) of this Graph as specified by the Graph interface. |
void |
removeBubble(int[] bubble)
Implementation of the abstract Yutsis.removeBubble(int
[]) method. |
void |
removeTriangle(int[] triangle)
Formats and removes the triangle triangle[0],
triangle[1], triangle[2] , as specified by the Yutsis interface. |
void |
setLogStream(java.io.PrintStream logstream)
Sets the PrintStream to which all operation which alter the graph will be logged. |
boolean |
sign(int node)
Returns the sign of node . |
java.lang.String |
toString()
A String representation of this graph in it's current state. |
int[] |
triangle()
Implementation of the abstract Yutsis.triangle() method. |
int[][] |
triangles()
Implementation of the abstract Yutsis.triangles() method. |
boolean |
triangularDelta()
Overrides the Yutsis.triangularDelta() method, taking in
account node signs and edge directions. |
boolean |
triangularDelta(int[] td)
Overrides the Yutsis.triangularDelta(int []) method,
taking in account node signs and edge directions. |
boolean |
triangularDelta(int node1,
int node2)
Overrides the Yutsis.triangularDelta(int, int) method,
taking in account node signs and edge directions. |
Methods inherited from class AbstractYutsis |
addIntermediateLabels, guessFileFormat, interchange, intermediateLabelsPresent, nrOfEdges, removeTriangle |
Methods inherited from class AbstractGraph |
addChangeListener, connected, fireStateChanged, isTree, removeChangeListener, toGml |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface Graph |
addChangeListener, connected, isTree, removeChangeListener, toGml |
Constructor Detail |
public YutsisGraph(java.io.BufferedReader input) throws java.io.IOException
input
- The BufferedReader where the YutsisGraph is read from.
java.io.IOException
- if an I/O error occurspublic YutsisGraph(java.io.BufferedReader input, int format) throws java.io.IOException
input
- The BufferedReader where the YutsisGraph is read from.format
- The format used (BRAKET or YTS)
java.io.IOException
- if an I/O error occurspublic YutsisGraph(java.lang.String braket)
braket
- A string containing a Recoupling Coefficient as a BRAKETpublic YutsisGraph(YutsisGraph y)
y
- the YutsisGraph to be duplicatedMethod Detail |
public int order()
Graph
interface.
Graph
Graph
public int nrOfNodes()
Graph
interface.
Graph
Graph
public int[] neighbors(int node)
node
or null
if the node is removed from the graph as specified by the
Graph
interface.
node
- the node for wich the neighbors are returned
Graph
public NodeIterator first()
NodeIterator
over the nodeset starting at the node
with lowest label as specified by the
Graph
interface.
NodeIterator
pointing to the first nodeNodeIterator
,
Graph
public NodeIterator last()
NodeIterator
over the nodeset starting at the node
with highest label in some ordening as specified by the
Graph
interface.
NodeIterator
pointing to the last nodeNodeIterator
,
Graph
public NodeIterator nodeIterator(int node)
NodeIterator
which will return node
by a NodeIterator.next()
call as specified by the
Graph
interface.
node
- the node to be returned by the first
NodeIterator.next()
of the returned
NodeIterator
NodeIterator
returning node
by the
first NodeIterator.next()
call.NodeIterator
,
Graph
public int cubicOrder()
public int n()
public boolean isRemoved(int node)
Graph.isRemoved(int)
method.
node
- the node to be checked
Graph
public Edge[] edges(int node)
node
.
node
- the node of which edges will be returned
Edge
s containing a copy of the edges
of the specified nodepublic java.lang.String[] edgeLabels(int node)
node
.
node
- the node of which the labels of its Edge
s
have to be returned
Edge
s coupled in the specified nodepublic Edge[] edges(int[] nodes)
nodes[0]
and
nodes[1]
(max 3) as an array of edges.
nodes
- an array containg the nodes of which the Edge
s
between them have to be returned
Edge
s connecting the specifed nodes as an
array of Edge
sEdge
public Edge[] edges(int node1, int node2)
node1
and
node2
(max 3) as a Vector or null if
one of the nodes is removed.
node1
- first nodenode2
- second node
Edge
s between the specified nodes as an array
of Edge
sEdge
public boolean sign(int node)
node
.
node
- the node of which the sign has to be returned
public void invertSign(int node)
node
.
node
- the node of which the sign has to be invertedpublic void invertEdge(int node, Edge e)
node
and inverts the edge
afterwards.
node
- an endpoint of the Edge
to be invertedEdge
public boolean isNewLabel(java.lang.String label)
label
- the label which to be checked
Edge
public int[] bubble()
Yutsis.bubble()
.
Yutsis
public void removeBubble(int[] bubble)
Yutsis.removeBubble(int
[])
method.
bubble
- the bubble to be removed.Yutsis
public int[] triangle()
Yutsis.triangle()
method.
Yutsis
public int[][] triangles()
Yutsis.triangles()
method.
Yutsis
public void removeTriangle(int[] triangle)
triangle[0],
triangle[1], triangle[2]
, as specified by the Yutsis
interface.
triangle
- array containing the nodes of the triangle to
be removedYutsis
public void interchange(int[] nodes, int[] icnodes)
Yutsis.interchange(int
[], int[] )
method.
nodes
- array containing the endpoints of the Edge
on which the interchange is performedicnodes
- array containing the neighbors of the corresponding
nodes of nodes to be interchangedYutsis
public boolean triangularDelta()
Yutsis.triangularDelta()
method, taking in
account node signs and edge directions.
triangularDelta
in interface Yutsis
triangularDelta
in class AbstractYutsis
Yutsis
public boolean triangularDelta(int[] td)
Yutsis.triangularDelta(int [])
method,
taking in account node signs and edge directions.
triangularDelta
in interface Yutsis
triangularDelta
in class AbstractYutsis
td
- the nodes of the triangular delta as an array
Yutsis
public boolean triangularDelta(int node1, int node2)
Yutsis.triangularDelta(int, int)
method,
taking in account node signs and edge directions.
triangularDelta
in interface Yutsis
triangularDelta
in class AbstractYutsis
node1
- first node of the triangular delta to be formattednode2
- second node of the triangular delta to be formatted
Yutsis
public GenRecoupCoeff genRecoupCoeff()
GenRecoupCoeff
GenRecoupCoeff
protected void log(java.lang.String tolog)
tolog
- the String to be loggedpublic java.lang.String braket()
public void setLogStream(java.io.PrintStream logstream)
System.err
.
When no logging is desired, set it to be null
.
logstream
- The PrintStream where logging will be donepublic java.lang.String toString()
n
...
node | edgelabel1: nghb1 edgelabel2: nghb2 edgelabel3: nghb3
...
.
toString
in class AbstractGraph
public java.lang.String[] gmlEdgeLabels(int i)
gmlEdgeLabels
in class AbstractGraph
i
- first node of the edge
public java.lang.Object clone()
clone
in interface Yutsis
clone
in class AbstractGraph
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public static void interactive(YutsisGraph y) throws java.io.IOException
CycleCostAlgorithm
. CycleGenerator
, PathGenerator
..
y
- the intial YutsisGraph
java.io.IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |