def __init__(self, lst=[] ):
        """
        @param lst: list of Complexes
        @type  lst: [ComplexEvolving]

        @raise ComplexListError: if list contains non-Complex item.
        """
        ComplexList.__init__( self, lst )
Beispiel #2
0
    def __init__(self, lst=[] ):
        """
        @param lst: list of Complexes
        @type  lst: [ComplexEvolving]

        @raise ComplexListError: if list contains non-Complex item.
        """
        ComplexList.__init__( self, lst )
Beispiel #3
0
    def toComplexList( self, version=-1 ):
        """
        Get a ComplexList that contains only a single version of each Complex.

        @param version: version in history, -1 == last [-1] (default: -1)
        @type  version: int

        @return: ComplexList
        @rtype: ComplexList
        """
        return ComplexList( [ c[ version ] for c in self ] )
Beispiel #4
0
    def allVersionList( self ):
        """
        Get all versions of each Complex as a seperate Complex instance.

        @return: ComplexList of normal Complex instances
        @rtype: ComplexList
        """
        r = ComplexList()

        for c in self:
            try:
                r += c.toList()
            except:
                r += [ c ]

        return r
    def toList( self, version=None ):
        """
        Get a simple python list of Complexes. If version==None, the list
        contains ComplexEvolving instances with all versions, otherwise
        the list contains Complex instances representing a single version.

        @param version: version in history, -1 == last, None == all
                        (default: None)
        @type  version: int

        @return: python list of Complexes
        @rtype: [ Complex ]
        """
        if version is None:
            return ComplexList.toList( self )

        return [ c[ version ] for c in self ]
Beispiel #6
0
    def toList( self, version=None ):
        """
        Get a simple python list of Complexes. If version==None, the list
        contains ComplexEvolving instances with all versions, otherwise
        the list contains Complex instances representing a single version.

        @param version: version in history, -1 == last, None == all
                        (default: None)
        @type  version: int

        @return: python list of Complexes
        @rtype: [ Complex ]
        """
        if version is None:
            return ComplexList.toList( self )

        return [ c[ version ] for c in self ]