f150afa1a7a1e03fb8d8d8d7e4dde9c626ce8d23,prody/dynamics/gnm.py,GNM,calcHinges,#GNM#,308

Before Change


    def calcHinges(self):
        if self._array is None:
            raise ValueError("Modes are not calculated.")
        V = np.sign(self._array)
        (m, n) = V.shape
        hinges = []
        for i in xrange(n):
            v = V[:,i]

After Change


        for i in xrange(n):
            v = V[:,i]
            // obtain the signs of eigenvector
            s = np.insert(np.sign(v), 0, 0)
            // obtain the relative magnitude of eigenvector
            mag = np.insert(np.sign(np.diff(np.abs(v))), 0, 0)
            // obtain the cross-overs
            torf = np.diff(s)!=0
            indices = np.where(torf)[0]
            // find which side is more close to zero
            for i in xrange(len(indices)):
                idx = indices[i]
                if mag[idx] > 0:
                    indices[i] -= 1
            hinges.append(indices)
        self._hinges = np.array(hinges)
        return self._hinges
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: prody/ProDy
Commit Name: f150afa1a7a1e03fb8d8d8d7e4dde9c626ce8d23
Time: 2016-11-27
Author: shz66@pitt.edu
File Name: prody/dynamics/gnm.py
Class Name: GNM
Method Name: calcHinges


Project Name: geomstats/geomstats
Commit Name: 0a9959a054c76361d796280421041a8b7d37239d
Time: 2018-12-26
Author: ninamio78@gmail.com
File Name: geomstats/stiefel.py
Class Name: StiefelCanonicalMetric
Method Name: retraction


Project Name: prody/ProDy
Commit Name: 71c53bd3beecb202a09a81964c7692ff52ae3eff
Time: 2019-10-02
Author: shz66@pitt.edu
File Name: prody/measure/transform.py
Class Name:
Method Name: getTransformation


Project Name: suavecode/SUAVE
Commit Name: a1114dda581bb405b0c63265fc5a682344791d72
Time: 2021-02-08
Author: timdmacdo@gmail.com
File Name: trunk/SUAVE/Methods/Aerodynamics/Supersonic_Zero/Lift/vortex_lift.py
Class Name:
Method Name: vortex_lift