| Trees | Indices | Help |
|
|---|
|
|
DatabaseObject --+
|
Cord
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
table =
|
|||
fields =
|
|||
id_field =
|
|||
|
|||
Test whether the cord encodes a numerical value (approximate). This function is inexact: it returns true for knot sequences that could be numbers, even if the knot spacing indicates otherwise. On the other hand, it has been conjectured that multiple numbers might be encoded on a single string, using the long knots as a separator; these sequences will be marked non-numerical by this function. |
Convert the cord into a numerical value encodeed (approximate). This function is not guaranteed to return the exact number encoded. We ignore "zeros" in the input string (which are encoded by gaps between knots in a fuzzy way, and therefore hard to make algorithmic), except for the last zero which we can detect because the ones digit is specially marked. Thus the numbers 10, 100, and 1000 all return 10 from numerify, although at least we can distinguish this equivalence group from 1 (because the ones digit is specially marked). Similarly, the numbers 164, 1064, and 1604 all return 164 from numerify, although 1640 (and 16400) will return 1640. Returns None if the string is not considered numerical according to numerical. |
|
|||
fields
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Fri Mar 9 18:36:02 2007 | http://epydoc.sourceforge.net |