21e91a0334e0b164629a86442fc7ec7131625e22,stellargraph/data/explorer.py,SampledBreadthFirstWalk,run,#SampledBreadthFirstWalk#Any#Any#Any#Any#,761

Before Change



                    // consider the subgraph up to and including depth d from root node
                    if depth <= d:
                        neighbours = self.neighbors(frontier[0])
                        if len(neighbours) == 0:
                            break
                        else:

After Change


                    if depth > max_hops:
                        continue
                    neighbours = (
                        self.neighbors(cur_node) if cur_node is not None else []
                    )
                    if len(neighbours) == 0:
                        // Either node is unconnected or is in directed graph with no out-nodes.
                        neighbours = [None] * n_size[cur_depth]
                    else:
                        // sample with replacement
                        neighbours = [
                            rs.choice(neighbours) for _ in range(n_size[cur_depth])
                        ]

                    // add them to the back of the queue
                    q.extend((sampled_node, depth) for sampled_node in neighbours)

                // finished i-th walk from node so add it to the list of walks as a list
                walks.append(walk)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: stellargraph/stellargraph
Commit Name: 21e91a0334e0b164629a86442fc7ec7131625e22
Time: 2019-09-08
Author: 52440942+geoffj-d61@users.noreply.github.com
File Name: stellargraph/data/explorer.py
Class Name: SampledBreadthFirstWalk
Method Name: run


Project Name: gboeing/osmnx
Commit Name: 984b805d094c3abcf44df1f135fec36d912261f7
Time: 2017-08-22
Author: gboeing@berkeley.edu
File Name: osmnx/plot.py
Class Name:
Method Name: plot_figure_ground


Project Name: pgmpy/pgmpy
Commit Name: b12e94502880495ecf8e14067855e06330bbeab1
Time: 2014-06-14
Author: navinchandak92@gmail.com
File Name: pgmpy/MarkovModel/UndirectedGraph.py
Class Name: UndirectedGraph
Method Name: print_graph