Ejemplo n.º 1
0
    def __new__(cls, cartantype):
        """Create a new RootSystem object

        This method assigns an attribute called cartan_type to each instance of
        a RootSystem object.  When an instance of RootSystem is called, it
        needs an argument, which should be an instance of a simple Lie algebra.
        We then take the CartanType of this argument and set it as the
        cartan_type attribute of the RootSystem instance.

        """
        obj = Basic.__new__(cls, cartantype)
        obj.cartan_type = CartanType(cartantype)
        return obj
Ejemplo n.º 2
0
    def __new__(cls, cartantype):
        """Create a new RootSystem object

        This method assigns an attribute called cartan_type to each instance of
        a RootSystem object.  When an instance of RootSystem is called, it
        needs an argument, which should be an instance of a simple Lie algebra.
        We then take the CartanType of this argument and set it as the
        cartan_type attribute of the RootSystem instance.

        """
        obj = Basic.__new__(cls, cartantype)
        obj.cartan_type = CartanType(cartantype)
        return obj
Ejemplo n.º 3
0
 def __new__(cls, cartantype):
     obj = Basic.__new__(cls, cartantype)
     obj.cartan_type = CartanType(cartantype)
     return obj
Ejemplo n.º 4
0
 def __new__(cls, cartantype):
     obj = Basic.__new__(cls, cartantype)
     obj.cartan_type = CartanType(cartantype)
     return obj