Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 91213ddcfbe7f54821d42c2d9e091326 > files > 3051

gap-system-packages-4.4.12-5mdv2010.0.i586.rpm

<html><head><title>[xgap] 8.2 Operations</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href = "C008S000.htm">Up</a>] [<a href ="C008S001.htm">Previous</a>] [<a href ="C008S003.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<h1>8.2 Operations</h1><p>
<p>
<strong>Constructors:</strong>
<p>
<a name = "SSEC1"></a>
<li><code>GraphicPoset( </code><var>name</var><code>, </code><var>width</var><code>, </code><var>height</var><code> ) O</code>
<p>
creates a new graphic poset which is a specialization of a graphic graph
mainly because per definition a poset comes in ``levels'' or ``layers''. 
This leads to some algorithms that are more efficient than the general 
ones for graphs.
<p>
<a name = "SSEC2"></a>
<li><code>CreateLevel( </code><var>poset</var><code>, </code><var>levelparam</var><code> ) O</code>
<li><code>CreateLevel( </code><var>poset</var><code>, </code><var>levelparam</var><code>, </code><var>lptext</var><code> ) O</code>
<p>
A level in a graphic poset can be thought of as a horizontal slice of
the poset. It has a y coordinate of the top of the level relatively to
the graphic sheet and a height. Every class of vertices in a graphic
poset is in a level. The levels are totally ordered by their y
coordinate. No two vertices which are included in each other are in the
same level. A vertex containing another one is always ``higher'' on the
screen, meaning in a ``higher'' level.  Every level has a unique level
parameter, which can be any <font face="Gill Sans,Helvetica,Arial">GAP</font> object. The user is responsible for all
methods where a level parameter occurs as parameter and is not just an
integer. There is NO <font face="Gill Sans,Helvetica,Arial">GAP</font> object representing a level which is visible
for the user of posets. All communication about levels goes via the
level parameter. <code>CreateLevel</code> creates a new level with level parameter
<var>levelparam</var> in the graphic poset <var>poset</var>. It returns <code>fail</code> if there
is already a level with a level parameter which is considered ``equal''
to <var>levelparam</var> by <code>CompareLevels</code> or <var>levelparam</var> if everything went
well.
<p>
The second method allows to specify which text appears for the level at
the right edge of the sheet.
<p>
<a name = "SSEC3"></a>
<li><code>CreateClass( </code><var>poset</var><code>, </code><var>levelparam</var><code>, </code><var>classparam</var><code> ) O</code>
<p>
A class in a graphic poset is a collection of vertices within a level
which belong together in some sense.  Every vertex in a graphic poset
is in a class, which in turn belongs to a level. Every class in a level
has a unique class parameter, which can be any <font face="Gill Sans,Helvetica,Arial">GAP</font> object. The user is
responsible for all methods where a class parameter occurs as parameter
and is not just an integer. There is NO <font face="Gill Sans,Helvetica,Arial">GAP</font> object representing a class
which is visible to the user of posets. All communication about classes
goes via the class parameter.  <code>CreateClass</code> creates a new class in the
level with level parameter <var>levelparam</var> in the graphic poset
<var>poset</var>. It returns <code>fail</code> if there is no level with level parameter
<var>levelparam</var> or there is already a class in this level with class
parameter <var>classparam</var>. <code>CreateClass</code> returns <var>classparam</var> otherwise.
<p>
<a name = "SSEC4"></a>
<li><code>Vertex( </code><var>graph</var><code>, </code><var>data</var><code>[, </code><var>inf</var><code>] ) O</code>
<p>
Creates a new vertex. <var>inf</var> is a record in which additional info can be
supplied for the new vertex. For general graphic graphs only the
<code>label</code>, <code>color</code>, <code>shape</code>, <code>x</code> and <code>y</code> components are applicable, they
contain a short label which will be attached to the vertex, the color,
the shape (<code>circle</code>, <code>diamond</code>, or <code>rectangle</code>) and the coordinates
relative to the graphic sheet respectively. For graphic posets also the 
components <code>levelparam</code> and <code>classparam</code> are evaluated. If the component
<code>hints</code> is bound in <var>inf</var> it must be a list of x coordinates which will be
delivered to <code>ChoosePosition</code> to help placement. Those x coordinates will
be the coordinates of other vertices related to the new one. All values of
record components which are not specified will be determined by calling 
some methods for graphic graphs or posets. Those are:
  <code>ChooseLabel</code> for the label,
  <code>ChooseColor</code> for the color,
  <code>ChooseShape</code> for the shape,
  <code>ChoosePosition</code> for the position,
  <code>ChooseLevel</code> for the level parameter, 
  <code>ChooseClass</code> for the class parameter, and
  <code>ChooseWidth</code> for the line width of the vertex.
<code>Vertex</code> returns <code>fail</code> if no vertex was created. This happens only, if
one of the choose functions return <code>fail</code> or no possible value, for
example a non-existing level or class parameter. <code>Vertex</code> returns a
vertex object if everything went well.
<p>
<a name = "SSEC5"></a>
<li><code>Edge( </code><var>graph</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code> ) O</code>
<li><code>Edge( </code><var>graph</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code>, </code><var>defaults</var><code> ) O</code>
<p>
Adds a new edge from <var>vertex1</var> to <var>vertex2</var>. For posets this puts one
of the vertices into the other as a maximal subvertex. So either
<var>vertex1</var> must lie in a ``higher'' level than <var>vertex2</var> or the other way
round. There must be no vertex ``between'' <var>vertex1</var> and <var>vertex2</var>. If
the two vertices are in the same level or one is already indirectly
included in the other <code>fail</code> is returned, otherwise <code>true</code>. That means,
that in the case where one of the two vertices is already a maximal
subobject of the other, then the method does nothing and returns <code>true</code>.
The variation with a <var>defaults</var> record just hands this over to the lower
levels, meaning that the line width and color are modified.
<p>
<strong>Destructors:</strong>
<p>
<a name = "SSEC6"></a>
<li><code>Delete( </code><var>poset</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code> )</code>
<a name = "SSEC6"></a>
<li><code>Delete( </code><var>poset</var><code>, </code><var>vertex1</var><code>)</code>
<a name = "SSEC6"></a>
<li><code>Delete( </code><var>poset</var><code>, </code><var>levelparam</var><code>, </code><var>classparam</var><code> )</code>
<p>
These three variants of the <code>Delete</code> operation delete an edge, a vertex and 
a class respectively.
<p>
<a name = "SSEC7"></a>
<li><code>DeleteLevel( </code><var>poset</var><code>, </code><var>levelparam</var><code> ) O</code>
<p>
The following method applies to a level. It returns <code>fail</code> if no level
with level parameter <var>levelparam</var> is in the poset. Otherwise the level
is deleted and all classes within it are also deleted! <code>DeleteLevel</code>
returns <code>true</code> if the level is successfully deleted.
<p>
<strong>Operations to change a poset:</strong>
<a name = "SSEC8"></a>
<li><code>ResizeLevel( </code><var>poset</var><code>, </code><var>levelparam</var><code>, </code><var>height</var><code> ) O</code>
<p>
Changes the height of a level. The y coordinate can only be changed by
permuting levels, see below.
Attention: This can increase the size of the sheet!
Returns <code>fail</code> if no level with level parameter <var>levelparam</var> exists and
<code>true</code> otherwise. 
<p>
<a name = "SSEC9"></a>
<li><code>MoveLevel( </code><var>poset</var><code>, </code><var>levelparam</var><code>, </code><var>position</var><code> ) O</code>
<p>
Moves a level to another position. <var>position</var> is an absolute index in
the list of levels. The level with level parameter <var>levelparam</var> will be
at the position <var>position</var> after the operation. This is only allowed if
the new ordering is compatible with the partial order given by
<code>CompareLevels</code> and if there is no connection of a vertex in the moving
level with another level with which it is interchanged.  So
<var>levelparam</var> is compared with all level parameters between the old and
the new position. If there is a contradiction, nothing happens and the
method returns <code>fail</code>. If everything works the operation returns
<code>true</code>.
<p>
<a name = "SSEC10"></a>
<li><code>Relabel( </code><var>graph</var><code>, </code><var>vertex</var><code>, </code><var>label</var><code> ) O</code>
<li><code>Relabel( </code><var>graph</var><code>, </code><var>vertex</var><code> ) O</code>
<li><code>Relabel( </code><var>poset</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code>, </code><var>label</var><code> ) O</code>
<li><code>Relabel( </code><var>poset</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code> ) O</code>
<p>
Changes the label of the vertex <var>vertex</var> or the edge between <var>vertex1</var>
and <var>vertex2</var>. This must be a short string. In the method where no
label is specified the new label is chosen functionally: the operation
<code>ChooseLabel</code> is called. Returns <code>fail</code> if an error occurs and <code>true</code>
otherwise.  This operation already exists in XGAP for graphic
objects.
<p>
<a name = "SSEC11"></a>
<li><code>Move( </code><var>graph</var><code>, </code><var>vertex</var><code>, </code><var>x</var><code>, </code><var>y</var><code> ) O</code>
<li><code>Move( </code><var>graph</var><code>, </code><var>vertex</var><code> ) O</code>
<p>
Moves vertex <var>vertex</var>. For posets coordinates are relative to the level
of the vertex. <var>vertex</var> must be a vertex object in <var>graph</var>. If no
coordinates are specified the operation <code>ChoosePosition</code> is
called. <code>Move</code> returns <code>fail</code> if an error occurs and <code>true</code> otherwise.
This operation already exists in XGAP for graphic objects.
<p>
<a name = "SSEC12"></a>
<li><code>Reshape( </code><var>graph</var><code>, </code><var>vertex</var><code> ) O</code>
<li><code>Reshape( </code><var>graph</var><code>, </code><var>vertex</var><code>, </code><var>shape</var><code> ) O</code>
<p>
Changes the shape of the vertex <var>vertex</var>. <var>vertex</var> must be a vertex
object in the graph or poset <var>graph</var>. For the method where no shape is
specified the new shape is chosen functionally: <code>ChooseShape</code> is called
for the corresponding data.  <code>Reshape</code> returns <code>fail</code> if an error
occurs and <code>true</code> otherwise.  This operation already exists in XGAP
for graphic objects.
<p>
<a name = "SSEC13"></a>
<li><code>Recolor( </code><var>graph</var><code>, </code><var>vertex</var><code> ) O</code>
<li><code>Recolor( </code><var>graph</var><code>, </code><var>vertex</var><code>, </code><var>color</var><code> ) O</code>
<li><code>Recolor( </code><var>poset</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code>, </code><var>color</var><code> ) O</code>
<li><code>Recolor( </code><var>poset</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code> ) O</code>
<p>
Changes the color of the vertex <var>vertex</var> or the edge between <var>vertex1</var>
and <var>vertex2</var>. <var>vertex</var> must be a vertex object in <var>graph</var>. For the
method where no color is specified the new color is chosen
functionally: <code>ChooseColor</code> is called for the corresponding
data. <code>Recolor</code> returns <code>fail</code> if an error occurs and <code>true</code>
otherwise. This operation already exists in XGAP for graphic objects.
<p>
<a name = "SSEC14"></a>
<li><code>SetWidth( </code><var>graph</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code>, </code><var>width</var><code> ) O</code>
<li><code>SetWidth( </code><var>graph</var><code>, </code><var>vertex1</var><code>, </code><var>vertex2</var><code> ) O</code>
<p>
Changes the line width of an edge. <var>vertex1</var> and <var>vertex2</var> must be
vertices in the graph <var>graph</var>. For the method where no line width is
specified the width is chosen functionally: <code>ChooseWidth</code> is called for
the corresponding data pair. Returns <code>fail</code> if an error occurs and
<code>true</code> otherwise. This operation already exists in XGAP for graphic
objects.
<p>
<a name = "SSEC15"></a>
<li><code>Highlight( </code><var>graph</var><code>, </code><var>vertex</var><code> ) O</code>
<li><code>Highlight( </code><var>graph</var><code>, </code><var>vertex</var><code>, </code><var>flag</var><code> ) O</code>
<p>
Changes the highlighting status of the vertex <var>vertex</var>. <var>vertex</var> must
be a vertex object in <var>graph</var>. For the method where no flag is
specified the new status is chosen functionally: <code>ChooseHighlight</code> is
called for the corresponding data. Returns <code>fail</code> if an error occurs
and <code>true</code> otherwise. This operation already exists in XGAP for
graphic objects.
<p>
<a name = "SSEC16"></a>
<li><code>Select( </code><var>graph</var><code>, </code><var>vertex</var><code>, </code><var>flag</var><code> ) O</code>
<li><code>Select( </code><var>graph</var><code>, </code><var>vertex</var><code> ) O</code>
<p>
Changes the selection state of the vertex <var>vertex</var>. <var>vertex</var> must be a
vertex object in <var>graph</var>. The flag determines whether the vertex
should be selected or deselected. This operation already exists in
XGAP for graphic objects.  The method without flags assumes <code>true</code>.
<p>
<a name = "SSEC17"></a>
<li><code>DeselectAll( </code><var>graph</var><code> ) O</code>
<p>
Deselects all vertices in the graph or poset <var>graph</var>.
<p>
<a name = "SSEC18"></a>
<li><code>Selected( </code><var>graph</var><code> ) O</code>
<p>
Returns a (shallow-)copy of the set of all selected vertices.
<p>
<strong>Operations for decisions:</strong>
<a name = "SSEC19"></a>
<li><code>ChooseLabel( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<li><code>ChooseLabel( </code><var>graph</var><code>, </code><var>data</var><code>, </code><var>data</var><code> ) O</code>
<p>
This operation is called during vertex or edge creation, if the caller
didn't specify a label for the vertex or edge. It has to return a short
string which will be attached to the vertex. If it returns <code>fail</code> the
new vertex is not generated! The generic method just returns the empty
string, so no label is generated.  This method is also called in the
<code>Relabel</code> method without label parameter.
<p>
<a name = "SSEC20"></a>
<li><code>ChooseLevel( </code><var>poset</var><code>, </code><var>data</var><code> ) O</code>
<p>
This operation is called during vertex creation, if the caller didn't
specify a level to which the vertex belongs. It has to return a level
parameter which exists in the poset. If it returns <code>fail</code> the new
vertex is not generated!
<p>
<a name = "SSEC21"></a>
<li><code>ChooseClass( </code><var>poset</var><code>, </code><var>data</var><code>, </code><var>levelparam</var><code> ) O</code>
<p>
This operation is called during vertex creation, if the caller didn't
specify a class to which the vertex belongs. It has to return a
class parameter which exists in the poset in the level with parameter
<var>levelparam</var>. If it returns <code>fail</code> the new vertex is not generated!
<p>
<a name = "SSEC22"></a>
<li><code>ChooseColor( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<li><code>ChooseColor( </code><var>graph</var><code>, </code><var>data1</var><code>, </code><var>data2</var><code> ) O</code>
<p>
This operation is called during vertex or edge creation. It has to return a
color. If it returns <code>fail</code> the new vertex is not generated!
It is also called in the <code>Recolor</code> method without color parameter.
<p>
<a name = "SSEC23"></a>
<li><code>ChooseHighlight( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<p>
This operation is called during vertex creation. It has to return a
flag which indicates, whether the vertex is highlighted or not. If it 
returns <code>fail</code> the new vertex is not generated!
It is also called in the <code>Highlight</code> method without flag parameter.
<p>
<a name = "SSEC24"></a>
<li><code>ChoosePosition( </code><var>poset</var><code>, </code><var>data</var><code>, </code><var>levelparam</var><code>, </code><var>classparam</var><code>, </code><var>hints</var><code> ) O</code>
<li><code>ChoosePosition( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<p>
This operation is called during vertex creation.  It has to return a
list with two integers: the coordinates. For posets those are relative
to the level the vertex resides in.  If it returns <code>fail</code> the new
vertex is not generated! The parameters <var>levelparam</var> and <var>classparam</var>
are level and class parameters respectively.
<p>
<a name = "SSEC25"></a>
<li><code>ChooseShape( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<p>
This operation is called during vertex creation.
It has to return a string out of the following list:
<code>circle</code>, <code>diamond</code>, <code>rectangle</code>.
If it returns <code>fail</code> the new vertex is not generated!
<p>
<a name = "SSEC26"></a>
<li><code>ChooseWidth( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<li><code>ChooseWidth( </code><var>graph</var><code>, </code><var>data1</var><code>, </code><var>data2</var><code> ) O</code>
<p>
This operation is called during vertex or edge creation.
It has to return a line width.
If it returns <code>fail</code> the new vertex or edge is not generated!
This is also called by the <code>SetWidth</code> operation without width parameter.
<p>
<a name = "SSEC27"></a>
<li><code>CompareLevels( </code><var>poset</var><code>, </code><var>levelparam1</var><code>, </code><var>levelparam2</var><code> ) O</code>
<p>
Compare two level parameters. -1 means that the level with parameter
<var>levelparam1</var> is ``higher'', 1 means that the one with parameter
<var>levelparam2</var> is ``higher'', 0 means that they are equal. <code>fail</code> means
that they are not comparable.
<p>
<strong>Operations to get information:</strong>
<a name = "SSEC28"></a>
<li><code>WhichLevel( </code><var>poset</var><code>, </code><var>y</var><code> ) O</code>
<p>
Determines the level in which position <var>y</var> is. <code>WhichLevel</code> returns the
level parameter or <code>fail</code>.
<p>
<a name = "SSEC29"></a>
<li><code>WhichClass( </code><var>poset</var><code>, </code><var>x</var><code>, </code><var>y</var><code> ) O</code>
<p>
Determines a class with a vertex which contains the position
<var>(<var>x</var>,<var>y</var>)</var>. The first class found is taken.  <code>WhichClass</code> returns a
list with the level parameter as first and the class parameter as
second element.  <code>WhichClass</code> returns <code>fail</code> if no such class is found.
<p>
<a name = "SSEC30"></a>
<li><code>WhichVertex( </code><var>graph</var><code>, </code><var>x</var><code>, </code><var>y</var><code> ) O</code>
<li><code>WhichVertex( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<li><code>WhichVertex( </code><var>graph</var><code>, </code><var>data</var><code>, </code><var>func</var><code> ) O</code>
<p>
Determines a vertex which contains the position <var>(<var>x</var>,<var>y</var>)</var>.
<code>WhichVertex</code> returns a vertex.  In the third form the function <var>func</var>
must take two parameters <var>data</var> and the data entry of a vertex in
question. It must return <code>true</code> or <code>false</code>, according to the right
vertex being found or not.  The function can for example consider just
one record component of data records.  <code>WhichVertex</code> returns <code>fail</code> in
case no vertex is found.
<p>
<a name = "SSEC31"></a>
<li><code>WhichVertices( </code><var>graph</var><code>, </code><var>x</var><code>, </code><var>y</var><code> ) O</code>
<li><code>WhichVertices( </code><var>graph</var><code>, </code><var>data</var><code> ) O</code>
<li><code>WhichVertices( </code><var>graph</var><code>, </code><var>data</var><code>, </code><var>func</var><code> ) O</code>
<p>
Determines the list of vertices which contain the position
<var>(<var>x</var>,<var>y</var>)</var>. <code>WhichVertices</code> returns a list.
In the third form the function <var>func</var> must take two parameters <var>data</var> and
the data entry of a vertex in question. It must return <code>true</code> or <code>false</code>, 
according to the vertex belonging into the result or not.
The function can for example consider just one record component of
data records.
Returns the empty list in case no vertex is found.
<p>
<a name = "SSEC32"></a>
<li><code>Levels( </code><var>poset</var><code> ) O</code>
<p>
Returns the list of level parameters in descending order meaning
highest to lowest. 
<p>
<a name = "SSEC33"></a>
<li><code>Classes( </code><var>poset</var><code>, </code><var>levelparam</var><code> ) O</code>
<p>
Returns the list of class parameters in the level with parameter
<var>levelparam</var>. <code>Classes</code> Returns <code>fail</code> if no level with parameter
<var>levelparam</var> exists. 
<p>
<a name = "SSEC34"></a>
<li><code>Vertices( </code><var>poset</var><code>, </code><var>levelparam</var><code>, </code><var>classparam</var><code> ) O</code>
<p>
Returns the list of vertices in the class with parameter <var>classparam</var>
in the level with parameter <var>levelparam</var>. Returns <code>fail</code> if no level
with parameter <var>levelparam</var> or no class with parameter <var>classparam</var>
exists in the level.
<p>
<a name = "SSEC35"></a>
<li><code>Maximals( </code><var>poset</var><code>, </code><var>vertex</var><code> ) O</code>
<p>
Returns the list of maximal subvertices in <var>vertex</var>. 
<p>
<a name = "SSEC36"></a>
<li><code>MaximalIn( </code><var>poset</var><code>, </code><var>vertex</var><code> ) O</code>
<p>
Returns the list of vertices, in which <var>vertex</var> is maximal.  
<p>
<a name = "SSEC37"></a>
<li><code>PositionLevel( </code><var>poset</var><code>, </code><var>levelparam</var><code> ) O</code>
<p>
Returns the y position of the level relative to the graphic
sheet and the height. Returns <code>fail</code> if no level with parameter 
<var>levelparam</var> exists.
<p>
<strong>Operations for user communication:</strong>
<a name = "SSEC38"></a>
<li><code>Menu( </code><var>graph</var><code>, </code><var>title</var><code>, </code><var>entrylist</var><code>, </code><var>typelist</var><code>, </code><var>functionslist</var><code> ) O</code>
<p>
This operation already exists in XGAP for graphic sheets.
Builds a new menu with title <var>title</var> but with information about the
type of the menu entry. 
This information describes the relation between the selection state of
the vertices and the parameters supplied to the functions. It is stored 
in the list <var>typelist</var>, which consists of strings. The following 
types are supported:
<p>
<dl compact>
<dt>  <code>forany</code> <dd>  always enabled, generic routines don't change anything
<p>
<dt>  <code>forone</code> <dd>  enabled iff exactly one vertex is selected
<p>
<dt>  <code>fortwo</code> <dd>  enabled iff exactly two vertices are selected
<p>
<dt>  <code>forthree</code><dd> enabled iff exactly three vertices are selected
<p>
<dt>  <code>forsubset</code><dd>enabled iff at least one vertex is selected
<p>
<dt>  <code>foredge</code> <dd> enabled iff a connected pair of two vertices is selected
<p>
<dt>  <code>formin2</code> <dd> enabled iff at least two vertices are selected
<p>
<dt>  <code>formin3</code> <dd> enabled iff at least three vertices are selected
<p>
</dl>
<p>
<var>entrylist</var> and <var>functionslist</var> are like in the original operation for
graphic sheets.
The <code>IsMenu</code> object is returned. It is also stored in the sheet.
<p>
<a name = "SSEC39"></a>
<li><code>ModifyEnabled( </code><var>graph</var><code>, </code><var>from</var><code>, </code><var>to</var><code> ) O</code>
<p>
Modifies the ``Enabledness'' of menu entries according to their type and
number of selected vertices. This operation works on all menu entries
of some menus: <var>from</var> is the first menu to work on and
<var>to</var> the last one (indices). Only menus with the property <code>IsAlive</code> are
considered. <code>ModifyEnabled</code> returns nothing.
<p>
<a name = "SSEC40"></a>
<li><code>InstallPopup( </code><var>graph</var><code>, </code><var>func</var><code> ) O</code>
<p>
Installs a function that is called if the user clicks with the right
button on a vertex. The function gets as parameters:
 <var>poset</var>,<var>vertex</var>,<var>x</var>,<var>y</var>        (click position)
<p>
<a name = "SSEC41"></a>
<li><code>PosetLeftClick( </code><var>poset</var><code>, </code><var>x</var><code>, </code><var>y</var><code> ) O</code>
<p>
This operation is called when the user does a left click in the poset
<var>poset</var>. The current pointer position is supplied in the parameters <var>x</var> 
and <var>y</var>. The generic method for <code>PosetLeftClick</code> lets the user move,
select and deselect vertices or edges. An edge is selected as pair of
vertices. 
<p>
<a name = "SSEC42"></a>
<li><code>PosetCtrlLeftClick( </code><var>poset</var><code>, </code><var>x</var><code>, </code><var>y</var><code> ) O</code>
<p>
This operation is called when the user does a left click in a poset
<var>poset</var> while holding down the control key. The current pointer
position is supplied in the parameters <var>x</var> and <var>y</var>. The generic method
for <code>PosetCtrlLeftClick</code> lets the user move, select and deselect
vertices or edges. The difference to the operation without the control
key is, that while selecting the old vertices are NOT deselected.
Moving does not move the whole class but only one vertex. This allows
for permuting the vertices within a class. An edge is selected as pair
of vertices.
<p>
<a name = "SSEC43"></a>
<li><code>PosetRightClick( </code><var>poset</var><code>, </code><var>x</var><code>, </code><var>y</var><code> ) O</code>
<p>
This operation is called when the user does a right click in the graph
<var>graph</var>.  The generic method just finds the vertex under the mouse
pointer and calls the <code>rightclickfunction</code> of the poset or graph which
is a component in the <font face="Gill Sans,Helvetica,Arial">GAP</font> object. Note that the <code>rightclickfunction</code>
can be called with <code>fail</code> if no vertex is hit.
<p>
<strong>Operations for user actions:</strong>
<a name = "SSEC44"></a>
<li><code>UserDeleteVerticesOp( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Delete vertices</code>.
The generic method actually deletes the selected vertices including all
their edges.
<p>
<a name = "SSEC45"></a>
<li><code>UserDeleteEdgeOp( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Delete edge</code>.
The generic method deletes the edge with no further warning!
<p>
<a name = "SSEC46"></a>
<li><code>UserMergeClassesOp( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Merge Classes</code>.
The generic method walks through all levels and merges all classes that
contain a selected vertex. Afterwards <code>UserRearrangeClasses</code> is called.
<p>
<a name = "SSEC47"></a>
<li><code>UserMagnifyLattice( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Magnify Lattice</code>. 
The generic method scales everything by <var>144/100</var> including the sheet,
all heights of levels and positions of vertices.
<p>
<a name = "SSEC48"></a>
<li><code>UserShrinkLattice( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Shrink Lattice</code>. 
The generic method scales everything by 100/144 including the sheet,
all heights of levels and positions of vertices.
<p>
<a name = "SSEC49"></a>
<li><code>UserResizeLattice( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Resize Lattice</code>. 
The generic method asks the user for an x and a y factor and scales
everything including the sheet, all heights of levels and positions of 
vertices.
<p>
<a name = "SSEC50"></a>
<li><code>UserResizeSheet( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Resize Sheet</code>. 
The generic method asks the user for an x and a y pixel number and
changes the width and height of the sheet. No positions of levels and
vertices are changed. If the user asks for trouble he gets it!
<p>
<a name = "SSEC51"></a>
<li><code>UserMoveLattice( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Move Lattice</code>. 
The generic method asks the user for a pixel number and
changes the position of all vertices horizontally. No positions of 
levels are changed. 
<p>
<a name = "SSEC52"></a>
<li><code>UserChangeLabels( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Change Labels</code>. 
The user is prompted for every selected vertex, which label it should
have.
<p>
<a name = "SSEC53"></a>
<li><code>UserAverageY( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Average Y Positions</code>.
In all levels the average y coordinate is calculated and all vertices are
moved to this y position.
<p>
<a name = "SSEC54"></a>
<li><code>UserAverageX( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Average X Positions</code>.
The average of all x coordinates of the selected vertices is calculated.
Then all classes with a selected vertex are moved such that the first
selected vertex in this class has the calculated position as x position.
<p>
<a name = "SSEC55"></a>
<li><code>UserRearrangeClasses( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Rearrange Classes</code>.
All classes with a selected vertex are rearranged: The vertices are
lined up neatly one after the other, sorted according to their current
x position.
<p>
<a name = "SSEC56"></a>
<li><code>UserUseBlackWhite( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This is called if the user selects <code>Use Black and White</code> in the menu.
<p>
<a name = "SSEC57"></a>
<li><code>PosetShowLevels( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Show Levels</code> in the menu.
Switches the display of the little boxes for level handling on and off.
<p>
<a name = "SSEC58"></a>
<li><code>PosetShowLevelparams( </code><var>sheet</var><code>, </code><var>menu</var><code>, </code><var>entry</var><code> ) O</code>
<p>
This operation is called when the user selects <code>Show Level Parameters</code> in 
the menu. Switches the display of the level parameters at the right of
the screen on and off.
<p>
<a name = "SSEC59"></a>
<li><code>DoRedraw( </code><var>graph</var><code> ) O</code>
<p>
Redraws all vertices and connections.
<p>
<p>
[<a href = "C008S000.htm">Up</a>] [<a href ="C008S001.htm">Previous</a>] [<a href ="C008S003.htm">Next</a>] [<a href = "theindex.htm">Index</a>]
<P>
<address>xgap manual<br>Mai 2003
</address></body></html>