e564e9df5e6fe95ca8c3b08910eae5fa4261a123,nn_dataflow/core/node_region.py,NodeRegion,contains_node,#NodeRegion#Any#,61

Before Change



    def contains_node(self, coordinate):
        """ Whether the region contains the given coordinate. """
        min_coord = self.origin
        max_coord = self.origin + self.dim
        return all(cmin <= c and c < cmax for c, cmin, cmax
                   in zip(coordinate, min_coord, max_coord))

    def node_iter(self):
        """ Iterate through all nodes in the region. """
        gens = []

After Change



    def contains_node(self, coordinate):
        """ Whether the region contains the given absolute node coordinate. """
        return coordinate in self.node_iter()

    def node_iter(self):
        """ Iterate through all absolute node coordinates in the region. """
        for rel_coord in itertools.product(*[range(d) for d in self.dim]):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: stanford-mast/nn_dataflow
Commit Name: e564e9df5e6fe95ca8c3b08910eae5fa4261a123
Time: 2017-09-08
Author: mgao12@stanford.edu
File Name: nn_dataflow/core/node_region.py
Class Name: NodeRegion
Method Name: contains_node


Project Name: masa-su/pixyz
Commit Name: e2d8c0198e63660e421d4552e37ef723491230bd
Time: 2020-06-29
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: DistGraph
Method Name: has_reparam


Project Name: stanford-mast/nn_dataflow
Commit Name: a29efe2ccf3b8fe3b46294e2d4d3047517cbdd04
Time: 2018-07-02
Author: mgao12@stanford.edu
File Name: nn_dataflow/core/node_region.py
Class Name: NodeRegion
Method Name: contains_node