7d10d024cebd46a97b134d6902def43fba6d9324,pygsp/graphs/community.py,Community,__init__,#Community#Any#Any#Any#Any#Any#Any#Any#,42

Before Change


                                 sizes has to be equal to N")

        if not min_com:
            min_com = round(float(N) / Nc / 3.)

        if not min_deg:
            min_deg = round(min_com/2.)

        if not world_density:
            world_density = 1./N

        // Begining
        if np.shape(com_sizes)[0] == 0:
            x = N - (min_com - 1)*Nc - 1
            com_lims = np.sort(np.resize(np.random.permutation(int(x)), (Nc - 1.))) + 1
            com_lims += np.cumsum((min_com-1)*np.ones(np.shape(com_lims)))
            com_lims = np.concatenate((np.array([0]), com_lims, np.array([N])))
            com_sizes = np.diff(com_lims)

        if False:  // Verbose > 2 ?
            X = np.zeros((10000, Nc + 1))
            // pick randomly param.Nc-1 points to cut the rows in communtities:
            for i in range(10000):
                com_lims_tmp = np.sort(np.resize(np.random.permutation(int(x)),
                                                 (Nc - 1.))) + 1
                com_lims_tmp += np.cumsum((min_com - 1) *
                                          np.ones(np.shape(com_lims_tmp)))
                X[i, :] = np.concatenate((np.array([0]), com_lims_tmp,
                                          np.array([N])))
                // dX = np.diff(X.T).T

After Change


                                 sizes has to be equal to N")

        if not min_com:
            min_com = int(round(float(N) / Nc / 3.))

        if not min_deg:
            min_deg = round(min_com/2.)

        if not world_density:
            world_density = 1./N

        // Begining
        if np.shape(com_sizes)[0] == 0:
            x = N - (min_com - 1)*Nc - 1
            com_lims = np.sort(np.resize(np.random.permutation(int(x)), (Nc - 1.))) + 1
            com_lims += np.cumsum((min_com-1)*np.ones(np.shape(com_lims)))
            com_lims = np.concatenate((np.array([0]), com_lims, np.array([N])))
            com_sizes = np.diff(com_lims)

        if False:  // Verbose > 2 ?
            X = np.zeros((10000, Nc + 1))
            // pick randomly param.Nc-1 points to cut the rows in communtities:
            for i in range(10000):
                com_lims_tmp = np.sort(np.resize(np.random.permutation(int(x)),
                                                 (Nc - 1.))) + 1
                com_lims_tmp += np.cumsum((min_com - 1) *
                                          np.ones(np.shape(com_lims_tmp)))
                X[i, :] = np.concatenate((np.array([0]), com_lims_tmp,
                                          np.array([N])))
                // dX = np.diff(X.T).T
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: epfl-lts2/pygsp
Commit Name: 7d10d024cebd46a97b134d6902def43fba6d9324
Time: 2015-08-18
Author: lionel.martin@epfl.ch
File Name: pygsp/graphs/community.py
Class Name: Community
Method Name: __init__


Project Name: deepfakes/faceswap
Commit Name: a3585fe5c969f648e7f0b6e9d866fa9051af881a
Time: 2019-08-04
Author: vrooman.kyle@gmail.com
File Name: plugins/convert/mask/_base.py
Class Name: BlurMask
Method Name: blurred


Project Name: epfl-lts2/pygsp
Commit Name: 62fcc1faeeaf19f008e98e5135e218a443172d6c
Time: 2015-02-17
Author: basile.chatillon@epfl.ch
File Name: pygsp/graphs.py
Class Name: Community
Method Name: __init__


Project Name: epfl-lts2/pygsp
Commit Name: 217a9e6ca336c9af8326379eb5c7c4a324be0040
Time: 2015-02-17
Author: basile.chatillon@epfl.ch
File Name: pygsp/graphs.py
Class Name: Community
Method Name: __init__


Project Name: NifTK/NiftyNet
Commit Name: e2a6b11582a9379afac0d7bcd7acc426e1e6119d
Time: 2018-02-21
Author: eli.gibson@gmail.com
File Name: niftynet/network/simple_gan.py
Class Name: ImageGenerator
Method Name: layer_op