SetSystem

24 views
Skip to first unread message

Gordon

unread,
Dec 5, 2013, 1:24:08 AM12/5/13
to sage-m...@googlegroups.com
How do I access the SetSystem class that Rudi built from within Sage?

I want to use it to represent clutters...

Gordon

Michael Welsh

unread,
Dec 5, 2013, 1:26:35 AM12/5/13
to sage-m...@googlegroups.com
On 5/12/2013, at 1924, Gordon <gordon...@gmail.com> wrote:
>
> How do I access the SetSystem class that Rudi built from within Sage?

Does
from sage.matroids.set_system import *
work?

Gordon Royle

unread,
Dec 5, 2013, 1:31:08 AM12/5/13
to sage-m...@googlegroups.com
Yes, it does. Thanks.

I'm sure its easy if you know how, but what is the recommended way to find out for myself where things are located within Sage? (I could not locate it by typing "SetSystem" into the Sage documentation page)



--

---
You received this message because you are subscribed to the Google Groups "sage-matroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-matroid...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Michael Welsh

unread,
Dec 5, 2013, 2:05:14 AM12/5/13
to sage-m...@googlegroups.com
On 5/12/2013, at 1931, Gordon Royle <gordon...@gmail.com> wrote:
>
> I'm sure its easy if you know how, but what is the recommended way to find out for myself where things are located within Sage? (I could not locate it by typing "SetSystem" into the Sage documentation page)

I just looked at the sage-matroid source code. It's the best way to find undocumented functions.

Stefan van Zwam

unread,
Dec 5, 2013, 11:19:57 PM12/5/13
to sage-m...@googlegroups.com
In this particular case, it's undocumented on purpose, because we consider it an internal data type, and reserve the right to change it without notice. Because of this, and because we want it to be fast,

1) Most methods are cdef, so they are only accessible if you write Cython code and cimport the class
2) The cpdef methods are underscored, so by default Sage autocomplete does not print them.  

I think it would be great if Sage had a proper SetSystem class, but it'll take a lot of work to turn our class into something like that.

--Stefan.

Rob Beezer

unread,
Dec 5, 2013, 11:52:27 PM12/5/13
to sage-m...@googlegroups.com
On 12/04/2013 11:05 PM, Michael Welsh wrote:
> I just looked at the sage-matroid source code. It's the best way to find undocumented functions.
>

And here is a great way to get started on that:

sage: search_src("SetSystem")
- returns about 100 different lines of code, with file names and line numbers

sage: search_def("SetSystem")
- returns about 25 lines of code, one of which is

matroids/set_system.pxd:3:cdef class SetSystem:

which is where I would start digging further.

Rob


Reply all
Reply to author
Forward
0 new messages