Hello everyone!
I tried using the HasseDiagram and rank features of Sage as described on
http://www.sagemath.org/doc/reference/sage/combinat/posets/hasse_diagram.html
Things worked ok, but when I then tried:
m= Matrix([[0,1,1],[0,0,1],[0,0,0]])
g = DiGraph(m)
h2 = HasseDiagram(g)
h2.rank(2)
I got the message:
Traceback (click to the left of this block for traceback)
...
TypeError: 'NoneType' object is not callable
Clicking to the left of the block gives:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_11.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding:
utf-8 -*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("aDIucmFuaygyKQ=="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmp_tnVLn/___code___.py", line 3, in <module>
exec compile(u'h2.rank(_sage_const_2 )
File "", line 1, in <module>
File
"/sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/sage/combinat/posets/hasse_diagram.py",
line 567, in rank
return self.rank_function()(element)
TypeError: 'NoneType' object is not callable
Please tell me what this means and how I can get rank working properly.
Also, I have a complaint about HasseDiagram, in that for the matrix
above, it draws a link from 0 to 1, from 1 to 2, and from 0 to 2. In
the usual definition of a Hasse diagram, the link from 0 to 2
shouldn't show, since 0 > 1 > 2. (I'm referring to the nodes;
obviously the previous inequalities are nonsense numerically.) (For
example, see http://mathworld.wolfram.com/HasseDiagram.html and
http://mathworld.wolfram.com/CoverRelation.html.)
Thanks in advance for any help you can give!
*****************************************************
Raymond N. Greenwell [email protected]
Professor of Mathematics (516) 463-5573
103 Hofstra University
Hempstead, NY 11549-1030
http://people.hofstra.edu/rgreenwell
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org