# HG changeset patch
# User Minh Van Nguyen <nguyenminh2@gmail.com>
# Date 1249894083 25200
# Node ID 730de71222d11c061cb5b05d7e1152a602e78874
# Parent 87b600f2b8d586ea15239b60720ba6a89e11e44c
trac 6725: spell-check all modules under sage/monoids
diff -r 87b600f2b8d5 -r 730de71222d1 sage/monoids/free_abelian_monoid.py
|
a
|
b
|
|
| 15 | 15 | ``FreeAbelianMonoid`` function. |
| 16 | 16 | |
| 17 | 17 | EXAMPLE 1: It is possible to create an abelian monoid in zero or |
| 18 | | more variables; the syntax T(1) creates the monoid indentity |
| | 18 | more variables; the syntax T(1) creates the monoid identity |
| 19 | 19 | element even in the rank zero case. |
| 20 | 20 | |
| 21 | 21 | :: |
diff -r 87b600f2b8d5 -r 730de71222d1 sage/monoids/free_monoid_element.py
|
a
|
b
|
|
| 76 | 76 | x2.append(v) |
| 77 | 77 | self._element_list = x2 |
| 78 | 78 | else: |
| 79 | | self._element_list = list(x) # make copy, so user can't accidently change monoid. |
| | 79 | self._element_list = list(x) # make copy, so user can't accidentally change monoid. |
| 80 | 80 | |
| 81 | 81 | else: |
| 82 | 82 | # TODO: should have some other checks here... |
| … |
… |
|
| 259 | 259 | ## <=, and >= be defined for a general poset? |
| 260 | 260 | ## N.B. An equal operator __equal__ may or may not |
| 261 | 261 | ## have been introduced to define == and != but can |
| 262 | | ## not be used in conjuction with __cmp__. |
| | 262 | ## not be used in conjunction with __cmp__. |
| 263 | 263 | ## """ |
| 264 | 264 | if not isinstance(y,FreeMonoidElement) or y.parent() != self.parent(): |
| 265 | 265 | #raise TypeError, "Argument y (= %s) is of the wrong type."%y |
diff -r 87b600f2b8d5 -r 730de71222d1 sage/monoids/string_monoid.py
|
a
|
b
|
|
| 3 | 3 | |
| 4 | 4 | AUTHOR: David Kohel <kohel@maths.usyd.edu.au>, 2007-01 |
| 5 | 5 | |
| 6 | | SAGE supports a wide range of specific free string monoids. |
| | 6 | Sage supports a wide range of specific free string monoids. |
| 7 | 7 | """ |
| 8 | 8 | #***************************************************************************** |
| 9 | 9 | # Copyright (C) 2007 David Kohel <kohel@maths.usyd.edu.au> |
| … |
… |
|
| 314 | 314 | r""" |
| 315 | 315 | The binary encoding of the string S, as a binary string element. |
| 316 | 316 | |
| 317 | | The default is to keep the standard ascii byte encoding, e.g. |
| | 317 | The default is to keep the standard ASCII byte encoding, e.g. |
| 318 | 318 | |
| 319 | 319 | A = 65 -> 01000001 |
| 320 | 320 | B = 66 -> 01000010 |
| … |
… |
|
| 466 | 466 | |
| 467 | 467 | def encoding(self,S,padic=False): |
| 468 | 468 | r""" |
| 469 | | The encoding of the string S, as a hexidecimal string element. |
| | 469 | The encoding of the string S, as a hexadecimal string element. |
| 470 | 470 | |
| 471 | 471 | The default is to keep the standard right-to-left byte encoding, e.g. |
| 472 | 472 | |