Table of Contents

BigObject PartiallyOrderedSet<Decoration, SeqType>

from application graph

A PartiallyOrderedSet is a poset where join and meet exist for any two elements. It is realized as a directed graph. Some implementations currently restricted to ranked posets (will be fixed soon™).

Type Parameters:

Decoration: additional data associated with each node. Should be derived from BasicDecoration.

SeqType: tag describing the node ordering, should be Sequential or Nonsequential.

derived from:
Specializations:

PartiallyOrderedSet::Basic: A PartiallyOrderedSet with a BasicDecoration, which corresponds to the legacy HasseDiagram type

Properties

Combinatorics

These properties capture combinatorial information of the object. Combinatorial properties only depend on combinatorial data of the object like, e.g., the face lattice.


BOTTOM_NODE

The index of the bottom node

Type:
Int
Example:

The following prints the bottom node of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->BOTTOM_NODE;
 0


COMPARABILITY_GRAPH

An edge signals the comparability among poset elements (without top and bottom). Index shift by -1 since bottom and top are missing. This is required per specification of the GraphAdjacency class

Type:

DECORATION

This is the data associated to each node. The prototype for this is BasicDecoration, which consists of properties face and rank.

Type:
NodeMap<Directed,Decoration>
Example:

The following prints this property of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->DECORATION;
 ({} 0)
 ({0} 1)
 ({1} 1)
 ({2} 1)
 ({1 2} 2)
 ({0 2} 2)
 ({0 1} 2)
 ({0 1 2} 3)


DIMS

Kept only for backwards compatibility. Basically encodes the INVERSE_RANK_MAP in FaceLattice objects prior to 3.0.7

Type:

FACES

The face of each node, realized as a NodeMap. This property is kept for two reasons: As a convenient way to access only the face part of the decoration (in this case the property is temporary) and for reasons of backwards compatibility.

Type:
Example:

The following prints the faces of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->FACES;
 {}
 {0}
 {1}
 {2}
 {1 2}
 {0 2}
 {0 1}
 {0 1 2}


INVERSE_RANK_MAP

This property provides an efficient way to enumerate all nodes of a given rank. Internally these are realized differently, depending on whether the PartiallyOrderedSet is Sequential or Nonsequential. Both provide the same user methods though. Notice that this function is necessary for technical reasons (for any PartiallyOrderedSet, even if it has maximal chains of various lengths). In fact, a “rank map” for our purpose is any assignment of natural numbers to the elements of a poset such that the (total) ordering of the numbers refines the (partial) ordering of the corresponding elements.

Type:
InverseRankMap<SeqType>
Example:

The following prints this property of the face lattice of the 2-simplex (triangle), where the tuples represent the ranges of nodes belonging to a specific rank:

 > print simplex(2)->HASSE_DIAGRAM->INVERSE_RANK_MAP;
 {(0 (0 0)) (1 (1 3)) (2 (4 6)) (3 (7 7))}


MAXIMAL_ANTI_CHAINS

Maximal anti-chains

Type:

MAXIMAL_CHAINS

Maximal chains

Type:

TOP_NODE

The index of the top node

Type:
Int
Example:

The following prints the top node of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->TOP_NODE;
 7


Methods

Combinatorics

These methods capture combinatorial information of the object. Combinatorial properties only depend on combinatorial data of the object like, e.g., the face lattice.


dual_faces()
Returns:
Example:

The following prints the dual faces of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->dual_faces();
 {0 1 2}
 {1 2}
 {0 2}
 {0 1}
 {0}
 {1}
 {2}
 {}


nodes_of_rank(Int r)
Parameters:

Int r

Returns:
Example:

The following prints the nodes of rank 1 of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->nodes_of_rank(1);
 {1 2 3}


nodes_of_rank_range(Int r1, Int r2)
Parameters:

Int r1

Int r2

Returns:
Example:

The following prints the nodes with rank between 1 and 2 of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->nodes_of_rank_range(1,2);
 {1 2 3 4 5 6}


rank()
Returns:
Int
Example:

The following prints the rank of the top node of the face lattice of the 2-simplex (triangle):

 > print simplex(2)->HASSE_DIAGRAM->rank();
 3


Visualization

These methods are for visualization.


VISUAL()

Visualize the partially ordered set.

Options:

Int seed: random seed value for the node placement

Returns:
Example:

The following visualizes the face lattice of the 2-simplex (triangle) with default settings:

 > simplex(2)->HASSE_DIAGRAM->VISUAL;

The following shows some modified visualization style of the same lattice:

 > simplex(2)->HASSE_DIAGRAM->VISUAL(NodeColor=>"green",EdgeThickness=>2,EdgeColor=>"purple");


VISUAL_DUAL()

Visualize the dual partially ordered set This only produces meaningful results for lattice where the codimension one nodes generate the lattice under intersection.

Options:

Int seed: random seed value for the node placement

Returns:
Example:

The following visualizes the dual face lattice of the 2-simplex (triangle) with default settings:

 > simplex(2)->HASSE_DIAGRAM->VISUAL_DUAL;

The following shows some modified visualization style of the same lattice:

 > simplex(2)->HASSE_DIAGRAM->VISUAL_DUAL(NodeColor=>"green",EdgeThickness=>2,EdgeColor=>"purple");