org.uacalc.lat
Class BasicLattice

java.lang.Object
  extended by org.uacalc.alg.GeneralAlgebra
      extended by org.uacalc.lat.BasicLattice
All Implemented Interfaces:
Algebra, SmallAlgebra, Lattice, Order

public class BasicLattice
extends GeneralAlgebra
implements SmallAlgebra, Lattice


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.uacalc.alg.SmallAlgebra
SmallAlgebra.AlgebraType
 
Field Summary
 
Fields inherited from class org.uacalc.alg.GeneralAlgebra
con, description, monitor, name, operations, operationsMap, similarityType, size, sub, universe
 
Fields inherited from interface org.uacalc.alg.Algebra
CARDINALITY_COUNTABLE, CARDINALITY_COUNTABLY_INFINITE, CARDINALITY_FINITE, CARDINALITY_INFINITE, CARDINALITY_UNKNOWN
 
Constructor Summary
BasicLattice(java.lang.String name, CongruenceLattice lat, boolean label)
          Make a BasicLattice from a CongruenceLattice.
BasicLattice(java.lang.String name, Lattice lat)
          Make a BasicLattice from a Lattice.
BasicLattice(java.lang.String name, org.latdraw.orderedset.OrderedSet poset)
          Make a BasicLattice from a poset.
 
Method Summary
 SmallAlgebra.AlgebraType algebraType()
          The type of algebra this is, like a quotient algebra.
 java.util.List<org.latdraw.orderedset.POElem> atoms()
           
 int cardinality()
           
 java.util.List<org.latdraw.orderedset.POElem> coatoms()
           
 void convertToDefaultValueOps()
          This is used in the UI.
 BasicLattice dual()
          Form the dual of the lattice.
 int elementIndex(java.lang.Object obj)
          This method will return k if elem is the kth element; otherwise -1.
 java.util.List<org.latdraw.orderedset.POElem> filter(org.latdraw.orderedset.POElem v)
           
 org.latdraw.orderedset.POElem findJoinIrred(org.latdraw.orderedset.POElem a, org.latdraw.orderedset.POElem b)
          This finds a join irreducible element which is minimal with respect to being below a and not below b.
 org.latdraw.orderedset.POElem findMeetIrred(org.latdraw.orderedset.POElem a, org.latdraw.orderedset.POElem b)
          This finds a meet irreducible element which is maximal with respect to being above a and not above b.
 org.latdraw.diagram.Diagram getDiagram()
           
 java.lang.Object getElement(int k)
          returns the kth element.
 org.latdraw.orderedset.OrderedSet getPoset()
           
 java.util.List getUniverseList()
          The universe as a List such getElement(k) will equal the kth element of the List.
 java.util.Map getUniverseOrder()
          A map that can be used for elementIndex(a).
 java.util.List<org.latdraw.diagram.Vertex> getVertices(java.util.List<org.latdraw.orderedset.POElem> lst)
           
 java.util.List<org.latdraw.orderedset.POElem> ideal(org.latdraw.orderedset.POElem v)
           
 java.util.List<org.latdraw.orderedset.POElem> irredundantJoinDecomposition(org.latdraw.orderedset.POElem v)
           
 java.util.List<org.latdraw.orderedset.POElem> irredundantMeetDecomposition(org.latdraw.orderedset.POElem v)
           
 java.lang.Object join(java.util.List args)
           
 java.lang.Object join(java.lang.Object obj1, java.lang.Object obj2)
           
 java.util.List<org.latdraw.orderedset.POElem> joinIrredsBelow(org.latdraw.orderedset.POElem v)
           
 java.util.List<org.latdraw.orderedset.POElem> joinIrreducibles()
          An optional operation returning the list of join irreducible elements.
 boolean leq(java.lang.Object obj1, java.lang.Object obj2)
          The order relation.
 java.util.List<org.latdraw.orderedset.POElem> lowerCovers(org.latdraw.orderedset.POElem v)
           
static void main(java.lang.String[] args)
          An optional operation returning the list of meet irreducible elements.
 java.util.List<org.latdraw.orderedset.POElem> makeIrredundantJoin(java.util.List<org.latdraw.orderedset.POElem> list)
           
 java.util.List<org.latdraw.orderedset.POElem> makeIrredundantMeet(java.util.List<org.latdraw.orderedset.POElem> list)
           
 org.latdraw.orderedset.OrderedSet makeOrderedSet(Lattice lat)
          Make a org.latdraw.orderedset.OrderedSet from a Lattice.
 java.lang.Object meet(java.util.List args)
           
 java.lang.Object meet(java.lang.Object obj1, java.lang.Object obj2)
           
 java.util.List<org.latdraw.orderedset.POElem> meetIrredsAbove(org.latdraw.orderedset.POElem v)
           
 java.util.List<org.latdraw.orderedset.POElem> meetIrreducibles()
          An optional operation returning the list of meet irreducible elements.
 org.latdraw.orderedset.POElem one()
           
 SubalgebraLattice sub()
          The subalgebra lattice.
 java.util.Set universe()
          We use java.util.Set to hold the universe of the algebra.
 java.util.List<org.latdraw.orderedset.POElem> upperCovers(org.latdraw.orderedset.POElem v)
           
 org.latdraw.orderedset.POElem zero()
           
 
Methods inherited from class org.uacalc.alg.GeneralAlgebra
con, constantOperations, getDescription, getMonitor, getName, getOperation, getOperationsMap, inputSize, isIdempotent, isSimilarTo, isTotal, isUnary, iterator, makeOperationTables, monitoring, operations, parent, parents, resetConAndSub, setDescription, setMonitor, setName, setOperations, setUniverse, similarityType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.uacalc.alg.SmallAlgebra
con, parent, parents, resetConAndSub
 
Methods inherited from interface org.uacalc.alg.Algebra
constantOperations, getDescription, getMonitor, getName, getOperation, getOperationsMap, inputSize, isIdempotent, isSimilarTo, isTotal, isUnary, iterator, makeOperationTables, monitoring, operations, setDescription, setMonitor, setName, similarityType
 

Constructor Detail

BasicLattice

public BasicLattice(java.lang.String name,
                    org.latdraw.orderedset.OrderedSet poset)
Make a BasicLattice from a poset.

Parameters:
poset - A (latdraw) poset

BasicLattice

public BasicLattice(java.lang.String name,
                    Lattice lat)
Make a BasicLattice from a Lattice.

Parameters:
lat - A Lattice with joinIrreducibles inplemented.

BasicLattice

public BasicLattice(java.lang.String name,
                    CongruenceLattice lat,
                    boolean label)
Make a BasicLattice from a CongruenceLattice.

Parameters:
lat - The congruence lattice
label - indicates if this should be TCT labelled
Method Detail

makeOrderedSet

public org.latdraw.orderedset.OrderedSet makeOrderedSet(Lattice lat)
Make a org.latdraw.orderedset.OrderedSet from a Lattice.

Parameters:
lat - A Lattice with joinIrreducibles implemented.

getDiagram

public org.latdraw.diagram.Diagram getDiagram()

cardinality

public int cardinality()
Specified by:
cardinality in interface Algebra
Overrides:
cardinality in class GeneralAlgebra
Returns:
the cardinality if possible, else a negative int

zero

public org.latdraw.orderedset.POElem zero()

one

public org.latdraw.orderedset.POElem one()

universe

public java.util.Set universe()
Description copied from interface: Algebra
We use java.util.Set to hold the universe of the algebra. In order to accomodate infinite algebras and algebras with unknown cardinality, we allow the following changes:

Specified by:
universe in interface Algebra
Overrides:
universe in class GeneralAlgebra

join

public java.lang.Object join(java.util.List args)
Specified by:
join in interface Lattice

join

public java.lang.Object join(java.lang.Object obj1,
                             java.lang.Object obj2)
Specified by:
join in interface Lattice

meet

public java.lang.Object meet(java.util.List args)
Specified by:
meet in interface Lattice

meet

public java.lang.Object meet(java.lang.Object obj1,
                             java.lang.Object obj2)
Specified by:
meet in interface Lattice

atoms

public java.util.List<org.latdraw.orderedset.POElem> atoms()
Specified by:
atoms in interface Lattice

coatoms

public java.util.List<org.latdraw.orderedset.POElem> coatoms()
Specified by:
coatoms in interface Lattice

joinIrreducibles

public java.util.List<org.latdraw.orderedset.POElem> joinIrreducibles()
Description copied from interface: Lattice
An optional operation returning the list of join irreducible elements.

Specified by:
joinIrreducibles in interface Lattice

meetIrreducibles

public java.util.List<org.latdraw.orderedset.POElem> meetIrreducibles()
Description copied from interface: Lattice
An optional operation returning the list of meet irreducible elements.

Specified by:
meetIrreducibles in interface Lattice

joinIrredsBelow

public java.util.List<org.latdraw.orderedset.POElem> joinIrredsBelow(org.latdraw.orderedset.POElem v)

meetIrredsAbove

public java.util.List<org.latdraw.orderedset.POElem> meetIrredsAbove(org.latdraw.orderedset.POElem v)

lowerCovers

public java.util.List<org.latdraw.orderedset.POElem> lowerCovers(org.latdraw.orderedset.POElem v)

upperCovers

public java.util.List<org.latdraw.orderedset.POElem> upperCovers(org.latdraw.orderedset.POElem v)

irredundantMeetDecomposition

public java.util.List<org.latdraw.orderedset.POElem> irredundantMeetDecomposition(org.latdraw.orderedset.POElem v)

findMeetIrred

public org.latdraw.orderedset.POElem findMeetIrred(org.latdraw.orderedset.POElem a,
                                                   org.latdraw.orderedset.POElem b)
This finds a meet irreducible element which is maximal with respect to being above a and not above b. Note if a is covered by b then [a,b] transposes up to [m,m*].


makeIrredundantMeet

public java.util.List<org.latdraw.orderedset.POElem> makeIrredundantMeet(java.util.List<org.latdraw.orderedset.POElem> list)

irredundantJoinDecomposition

public java.util.List<org.latdraw.orderedset.POElem> irredundantJoinDecomposition(org.latdraw.orderedset.POElem v)

findJoinIrred

public org.latdraw.orderedset.POElem findJoinIrred(org.latdraw.orderedset.POElem a,
                                                   org.latdraw.orderedset.POElem b)
This finds a join irreducible element which is minimal with respect to being below a and not below b. Note if a covers b then [b,a] transposes down to [j_*,j].


makeIrredundantJoin

public java.util.List<org.latdraw.orderedset.POElem> makeIrredundantJoin(java.util.List<org.latdraw.orderedset.POElem> list)

leq

public boolean leq(java.lang.Object obj1,
                   java.lang.Object obj2)
Description copied from interface: Order
The order relation.

Specified by:
leq in interface Order

ideal

public java.util.List<org.latdraw.orderedset.POElem> ideal(org.latdraw.orderedset.POElem v)

filter

public java.util.List<org.latdraw.orderedset.POElem> filter(org.latdraw.orderedset.POElem v)

getVertices

public java.util.List<org.latdraw.diagram.Vertex> getVertices(java.util.List<org.latdraw.orderedset.POElem> lst)

dual

public BasicLattice dual()
Form the dual of the lattice.


elementIndex

public int elementIndex(java.lang.Object obj)
Description copied from interface: SmallAlgebra
This method will return k if elem is the kth element; otherwise -1. (Should we have it throw an error instead?)

Specified by:
elementIndex in interface SmallAlgebra

getElement

public java.lang.Object getElement(int k)
Description copied from interface: SmallAlgebra
returns the kth element.

Specified by:
getElement in interface SmallAlgebra

getUniverseList

public java.util.List getUniverseList()
Description copied from interface: SmallAlgebra
The universe as a List such getElement(k) will equal the kth element of the List. It is allowed to be null.

Specified by:
getUniverseList in interface SmallAlgebra

getUniverseOrder

public java.util.Map getUniverseOrder()
Description copied from interface: SmallAlgebra
A map that can be used for elementIndex(a). It is allowed to be null.

Specified by:
getUniverseOrder in interface SmallAlgebra

getPoset

public org.latdraw.orderedset.OrderedSet getPoset()

sub

public SubalgebraLattice sub()
Description copied from interface: SmallAlgebra
The subalgebra lattice.

Specified by:
sub in interface SmallAlgebra
Overrides:
sub in class GeneralAlgebra

convertToDefaultValueOps

public void convertToDefaultValueOps()
Description copied from interface: SmallAlgebra
This is used in the UI. Only valid for BASIC algebras.

Specified by:
convertToDefaultValueOps in interface SmallAlgebra

algebraType

public SmallAlgebra.AlgebraType algebraType()
Description copied from interface: SmallAlgebra
The type of algebra this is, like a quotient algebra.

Specified by:
algebraType in interface SmallAlgebra
Returns:

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        BadAlgebraFileException,
                        org.latdraw.orderedset.NonOrderedSetException
An optional operation returning the list of meet irreducible elements.

Throws:
java.io.IOException
BadAlgebraFileException
org.latdraw.orderedset.NonOrderedSetException


Copyright 2003 Ralph Freese. All Rights Reserved.