Package seamcarving

Class GenerativeSeamFinder.PixelGraph.Pixel

    • Field Detail

      • x

        private final int x
      • y

        private final int y
    • Constructor Detail

      • Pixel

        public Pixel​(int x,
                     int y)
        Constructs a pixel representing the (x, y) indices in the picture.
        Parameters:
        x - horizontal index into the picture.
        y - vertical index into the picture.
    • Method Detail

      • neighbors

        public List<Edge<Node>> neighbors​(Picture picture,
                                          EnergyFunction f)
        Description copied from interface: Node
        Returns the List of right-up, right-middle, and right-down neighbors (if they exist) for this node.
        Specified by:
        neighbors in interface Node
        Parameters:
        picture - the input picture.
        f - the input energy function.
        Returns:
        the List of right-up, right-middle, and right-down neighbors (if they exist) for this node.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object