Package sage :: Package combinat :: Package posets :: Module elements :: Class PosetElement
[hide private]
[frames] | no frames]

Class PosetElement

source code

                      object --+        
                               |        
structure.sage_object.SageObject --+    
                                   |    
           structure.element.Element --+
                                       |
                                      PosetElement
Known Subclasses:
JoinSemilatticeElement, LatticePosetElement, MeetSemilatticeElement

Instance Methods [hide private]
 
__init__(self, poset, element, vertex)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
TESTS:...
source code
 
__eq__(self, other)
TESTS:...
source code
 
_cmp(self, other)
TESTS:...
source code
 
__lt__(self, other)
TESTS...
source code
 
__le__(self, other)
TESTS...
source code
 
__gt__(self, other)
TESTS...
source code
 
__ge__(self, other)
TESTS...
source code

Inherited from structure.element.Element: __cmp__, __hash__, __ne__, __new__, __nonzero__, __reduce__, __rxor__, __xor__, _cmp_, _im_gens_, _repr_, _richcmp_, base_base_extend, base_base_extend_canonical_sym, base_extend, base_extend_canonical, base_extend_canonical_sym, base_extend_recursive, base_ring, category, is_zero, n, parent, subs, substitute

Inherited from structure.sage_object.SageObject: _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, poset, element, vertex)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: structure.element.Element.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

TESTS:
    sage: repr(Poset([[1,2],[4],[3],[4],[]])(0))
    '0'

Overrides: structure.sage_object.SageObject.__repr__

__eq__(self, other)
(Equality operator)

source code 

TESTS:
    sage: P = Poset([[1,2],[4],[3],[4],[]])
    sage: P(0).__eq__(P(4))
    False
    sage: from sage.combinat.posets.elements import PosetElement
    sage: PosetElement(P,0,3) == PosetElement(P,0,3)
    True
    sage: PosetElement(P,1,3) == PosetElement(P,0,3)
    False
    sage: PosetElement(P,0,2) == PosetElement(P,0,3)
    False

Overrides: structure.element.Element.__eq__

_cmp(self, other)

source code 

TESTS:
    sage: P = Poset([[1,2],[4],[3],[4],[]])
    sage: P(0)._cmp(P(4))
    -1
    sage: P(4)._cmp(P(0))
    1
    sage: P(0)._cmp(P(0))
    0

__lt__(self, other)
(Less-than operator)

source code 

TESTS
    sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
    sage: P = Poset(dag)
    sage: P(0) < P(1)
    False
    sage: P(4) < P(1)
    False
    sage: P(0) < P(0)
    False

Overrides: structure.element.Element.__lt__

__le__(self, other)
(Less-than-or-equals operator)

source code 

TESTS
    sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
    sage: P = Poset(dag)
    sage: P(1) <= P(0)
    False
    sage: P(0) <= P(1)
    False
    sage: P(0) <= P(3)
    True
    sage: P(0) <= P(0)
    True

Overrides: structure.element.Element.__le__

__gt__(self, other)
(Greater-than operator)

source code 

TESTS
    sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
    sage: P = Poset(dag)
    sage: P(0).__gt__(P(5))
    False
    sage: P(5).__gt__(P(0))
    True
    sage: P(0).__gt__(P(0))
    False

Overrides: structure.element.Element.__gt__

__ge__(self, other)
(Greater-than-or-equals operator)

source code 

TESTS
    sage: dag = DiGraph({0:[2,3], 1:[3,4], 2:[5], 3:[5], 4:[5]})
    sage: P = Poset(dag)
    sage: P(0).__ge__(P(5))
    False
    sage: P(5).__ge__(P(0))
    True
    sage: P(0).__ge__(P(0))
    True

Overrides: structure.element.Element.__ge__