Esempio n. 1
0
    def MapAlignment(self, map_query=None, map_sbjct=None):

        self.Expand()

        tmp = alignlib_lite.py_makeAlignataVector()

        if map_query:
            tmp.Clear()
            map_query.Expand()
            alignlib_lite.py_combineAlignata(tmp,
                                             map_query.mMapQuery2Sbjct,
                                             self.mMapQuery2Sbjct,
                                             alignlib_lite.py_RR)
            map_query.Clear()
            alignlib_lite.py_copyAlignata(self.mMapQuery2Sbjct, tmp)
            self.mQueryToken = map_query.mSbjctToken

        if map_sbjct:
            tmp.Clear()
            map_sbjct.Expand()
            alignlib_lite.py_combineAlignata(tmp,
                                             self.mMapQuery2Sbjct,
                                             map_sbjct.mMapQuery2Sbjct,
                                             alignlib_lite.py_CR)
            map_sbjct.Clear()
            alignlib_lite.py_copyAlignata(self.mMapQuery2Sbjct, tmp)
            self.mSbjctToken = map_sbjct.mSbjctToken

        self.Contract()

        return self.IsOk()
Esempio n. 2
0
    def MapAlignment(self, map_query=None, map_sbjct=None):

        self.Expand()

        tmp = alignlib_lite.py_makeAlignataVector()

        if map_query:
            tmp.Clear()
            map_query.Expand()
            alignlib_lite.py_combineAlignata(tmp,
                                             map_query.mMapQuery2Sbjct,
                                             self.mMapQuery2Sbjct,
                                             alignlib_lite.py_RR)
            map_query.Clear()
            alignlib_lite.py_copyAlignata(self.mMapQuery2Sbjct, tmp)
            self.mQueryToken = map_query.mSbjctToken

        if map_sbjct:
            tmp.Clear()
            map_sbjct.Expand()
            alignlib_lite.py_combineAlignata(tmp,
                                             self.mMapQuery2Sbjct,
                                             map_sbjct.mMapQuery2Sbjct,
                                             alignlib_lite.py_CR)
            map_sbjct.Clear()
            alignlib_lite.py_copyAlignata(self.mMapQuery2Sbjct, tmp)
            self.mSbjctToken = map_sbjct.mSbjctToken

        self.Contract()

        return self.IsOk()
Esempio n. 3
0
    def GetClone( self ):
        """get copy of self.
        """

        m = Map()
        
        (m.mQueryToken, m.mSbjctToken, m.mEvalue,
         m.mQueryFrom, m.mQueryTo, m.mQueryAli,
         m.mSbjctFrom, m.mSbjctTo, m.mSbjctAli,
         m.mIsExpanded) = \
         (self.mQueryToken, self.mSbjctToken, self.mEvalue,
          self.mQueryFrom, self.mQueryTo, self.mQueryAli,
          self.mSbjctFrom, self.mSbjctTo, self.mSbjctAli,
          self.mIsExpanded)

        if self.mIsExpanded:
            m.mMapQuery2Sbjct = alignlib_lite.py_makeAlignataVector()
            alignlib_lite.py_copyAlignata( m.mMapQuery2Sbjct, self.mMapQuery2Sbjct )
            
        return m