1 | initial version |
So, I asked my question just a few minutes too soon. I had two problems: I needed to define the TestRingElement before TestRing, and I needed to specify the Element
attribute of TestRing. After the right things are imported, the following code runs:
class TestRingElement(CombinatorialFreeModuleElement):
def __init__(self, M, x):
super(TestRingElement, self).__init__(M, x)
self.data = x
class TestRing(CombinatorialFreeModule):
Element = TestRingElement
def __init__(self, R, G):
super(TestRing, self).__init__(R, G)
I am still curious, though, if anyone can answer my other question about passing in lists to the constructor.
2 | No.2 Revision |
So, I asked my question just a few minutes too soon. I had two problems: I needed to define the TestRingElement before TestRing, and I needed to specify the Element
attribute of TestRing. After the right things are imported, the following code runs:runs as expected:
class TestRingElement(CombinatorialFreeModuleElement):
def __init__(self, M, x):
super(TestRingElement, self).__init__(M, x)
self.data = x
class TestRing(CombinatorialFreeModule):
Element = TestRingElement
def __init__(self, R, G):
super(TestRing, self).__init__(R, G)
I am still curious, though, if anyone can answer my other question about passing in lists to the constructor.