| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
combinat.CombinatorialObject --+
|
object --+ |
| |
structure.sage_object.SageObject --+ |
| |
structure.element.Element --+
|
ImmutableListWithParent
A class for lists having a parent
Specification: any subclass C should implement __init__ which accepts the following
form C(parent, list = list)
EXAMPLES:
We create an immutable list whose parent is the class list:
sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent
sage: l = ImmutableListWithParent(list, [1,2,3])
sage: l._list
[1, 2, 3]
sage: l.parent()
<type 'list'>
sage: l.sibling([2,1]) == ImmutableListWithParent(list, [2,1])
True
sage: l.reversed()
[3, 2, 1]
sage: l.set_index(1,4)
[1, 4, 3]
|
|||
|
Inherited from |
|||
|
|||
EXAMPLES:
sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent
sage: l = ImmutableListWithParent(list, [1,2,3])
sage: l == loads(dumps(l))
True
|
EXAMPLES:
sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent
sage: l = ImmutableListWithParent(list, [1,2,3])
sage: l.parent()
<type 'list'>
|
EXAMPLES:
sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent
sage: l = ImmutableListWithParent(list, [1,2,3])
sage: l.__repr__()
'[1, 2, 3]'
|
EXAMPLES:
sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent
sage: l = ImmutableListWithParent(list, [1,2,3])
sage: m = ImmutableListWithParent(ZZ, [1,2,3])
sage: n = ImmutableListWithParent(ZZ, [2,3,4])
sage: l == l
True
sage: l == m
False
sage: m == n
False
|
Returns an ImmutableListWithParent object whose list is l and
whose parent is the same as self's parent.
Note that the implementation of this function makes an assumption
about the constructor for subclasses.
EXAMPLES:
sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent
sage: l = ImmutableListWithParent(list, [1,2,3])
sage: m = l.sibling([2,3,4]); m
[2, 3, 4]
sage: m.parent()
<type 'list'>
|
Returns the sibling of self which is obtained by reversing the elements of self. EXAMPLES: sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent sage: l = ImmutableListWithParent(list, [1,2,3]) sage: l.reversed() [3, 2, 1] |
Returns the sibling of self obtained by setting the $k^{th}$
entry of self to value.
EXAMPLES:
sage: from sage.combinat.crystals.tensor_product import ImmutableListWithParent
sage: l = ImmutableListWithParent(list, [1,2,3])
sage: l.set_index(0,2)
[2, 2, 3]
sage: l.set_index(1,4)
[1, 4, 3]
sage: _.parent()
<type 'list'>
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:32 2008 | http://epydoc.sourceforge.net |