[ Quick Start |
Syntax definition |
Examples ]
| |
Quick Start
|
|
| |
There is a test program written to demonstrate the abilities of the
cluster package. This program called test-cluster allows you
to define clusters and to investigate these clusters by a number of
functions.
It also provides you with the possibility to generate all clusters
of a given size defined on one of the default lattices.
|
|
| |
Syntax definition of the input file
|
|
| |
[ Clusters |
Colored Clusters |
Shared Functions |
Lattice |
Utilities ]
In the following the syntax of the input file of the test-cluster
program is defined. The program is run with two arguments defining
the name of the input and output file. If not specified, the default
names are input and output.
| Clusters |
| Syntax of expression |
Semantics of expression |
DefineCluster name
[source, sink] ...
[source, sink] %
|
Defines a cluster with the corresponding name by passing all
edges. The end of the edge list is defined by the symbol
%. In the following this cluster can be referenced by the
given name.
|
GenerateClusters n
destfilename psfilename
|
Generates all clusters with up to n edges which can be embedded
in the previous defined lattice.
The result is saved in the file given by destfilename. A
postscript file with the corresponding name is produced.
|
| Colored Clusters |
| Syntax of expression |
Semantics of expression |
DefineColoredCluster name
[source, sink] ...
[source, sink] %
DefineColors
(vertex, color) ...
(vertex, color)%
|
Defines a colored cluster with the corresponding name by first
defining the underlying cluster as above.
Define the colors by passing a list of vertices paired with
their color.The end of a list is defined by the symbol %.
In the following this cluster can be referenced by the given
name.
|
|
GenerateColoredClusters sourcefilename destfilename
psfilename
|
Generates all colored clusters which can be embedded in the
previous defined lattice from those clusters specified in the
file with the given sourcefilename.
The result is saved in the file given by destfilename.
A postscript file with the corresponding name is produced.
|
| Shared Functions |
| Syntax of expression |
Semantics of expression |
| Dump name |
Displays the referenced cluster. |
| Postscript name |
Prints the referenced cluster in the postscript file. Per default
this file is named cluster.ps.
|
| Embeddings name |
Evaluates the number of embeddings of the referenced cluster in
the actually defined lattice.
|
| SizeOfAutG name |
Evaluates the size of the automorphism group of the referenced
cluster.
|
| SubCluster name |
Iterates all subclusters of the referenced cluster and displays
them.
|
| Edges name |
Iterates all edges of the referenced cluster and displays them.
|
| Isomorphic name1 name2 |
Tests if the two referenced clusters are isomorphic. |
| Lattice |
| Syntax of expression |
Semantics of expression |
| Lattice latticetype |
Defines the latticetype. Values for latticetype are
linear, quadratic and triangle.
The default type is quadratic.
|
| ColoredLattice coloredlatticetype <n> |
Defines a quadratic colored lattice. Possible values for
coloredlatticetype are linear and bipartite.
If linear is chosen, n must be given. In this case the cluster is
colored with n different colors.
If bipartite is chosen, no further argument is required.
|
| Utilities |
| Syntax of expression |
Semantics of expression |
| CompareClusterFiles filename1 filename2 |
Compares the clusters defined in file1 and file2. |
| // some comment |
Allows you to add some comments to your input file. Notice that
comments are only allowed at the end of an expression statement,
but not in between.
|
| Exit |
Exit the program.
Everything beyond this statement won't be interpreted.
|
Fat printed expressions are terminal symbols not to be
changed. Normal printed expressions have to be specified in the
input file by the user. Expression enclosed in <> - brackets are
optional.
|
|
| |
Examples
|
|
| |
For an easy use some examples are given in the following.
Example 1
CompareClusterFiles eight.txt norbert.txt
Example 2
ColoredLattice linear 3
DefineColoredCluster MyCluster1
[1,2] [2,3] [3,4] %
DefineColors
(1,1) (2,1) (3,2) (4,2) %
Dump MyCluster1
DefineColoredCluster MyCluster2
[5,6] [6,7] [7,5] %
DefineColors
(5,3) (6,1) (7,1) %
Dump MyCluster2
Embeddings MyCluster1
Postscript MyCluster1 // draw a nice picture
Postscript MyCluster2
SubCluster MyCluster2 // display all subclusters
Example 3
ColoredLattice linear 3
GenerateColoredClusters five.txt cLin5.txt cLin5.ps
Example 4
ColoredLattice bipartite
GenerateColoredClusters eight.txt cBip8.txt cBip8.ps
Exit
|
|
|