Example #1
0
    def __init__(self, t = None):
        """
        INPUT:

         - ``t`` - a Cartan type or None

        EXAMPLES::
        
            sage: d = DynkinDiagram(["A", 3])
            sage: d == loads(dumps(d))
            True

        Implementation note: if a Cartan type is given, then the nodes
        are initialized from the index set of this Cartan type.
        """
        DiGraph.__init__(self)
        self._cartan_type = t
        if t is not None:
            self.add_vertices(t.index_set())
Example #2
0
    def __init__(self, t=None):
        """
        INPUT:

         - ``t`` - a Cartan type or None

        EXAMPLES::
        
            sage: d = DynkinDiagram(["A", 3])
            sage: d == loads(dumps(d))
            True

        Implementation note: if a Cartan type is given, then the nodes
        are initialized from the index set of this Cartan type.
        """
        DiGraph.__init__(self)
        self._cartan_type = t
        if t is not None:
            self.add_vertices(t.index_set())