Package seamfinding
Class AdjacencyListSeamFinder.PixelGraph
- java.lang.Object
-
- seamfinding.AdjacencyListSeamFinder.PixelGraph
-
- Enclosing class:
- AdjacencyListSeamFinder
private static class AdjacencyListSeamFinder.PixelGraph extends Object implements Graph<Node>
Adjacency list graph ofAdjacencyListSeamFinder.PixelGraph.Pixel
vertices andEnergyFunction
-weighted edges.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AdjacencyListSeamFinder.PixelGraph.Pixel
A pixel in theAdjacencyListSeamFinder.PixelGraph
representation of thePicture
withEnergyFunction
-weighted edges to neighbors.
-
Field Summary
Fields Modifier and Type Field Description private EnergyFunction
f
ThePicture
forneighbors(Node)
.private Picture
picture
ThePicture
forneighbors(Node)
.private AdjacencyListSeamFinder.PixelGraph.Pixel[][]
pixels
TheAdjacencyListSeamFinder.PixelGraph.Pixel
vertices in thePicture
.private Node
sink
SinkNode
for the adjacency list graph.private Node
source
SourceNode
for the adjacency list graph.
-
Constructor Summary
Constructors Modifier Constructor Description private
PixelGraph(Picture picture, EnergyFunction f)
Constructs an adjacency list graph by materializing all vertices and edges.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Edge<Node>>
neighbors(Node node)
Returns a list of the outgoing edges from the given vertex.
-
-
-
Field Detail
-
pixels
private final AdjacencyListSeamFinder.PixelGraph.Pixel[][] pixels
TheAdjacencyListSeamFinder.PixelGraph.Pixel
vertices in thePicture
.
-
picture
private final Picture picture
ThePicture
forneighbors(Node)
.
-
f
private final EnergyFunction f
ThePicture
forneighbors(Node)
.
-
-
Constructor Detail
-
PixelGraph
private PixelGraph(Picture picture, EnergyFunction f)
Constructs an adjacency list graph by materializing all vertices and edges.- Parameters:
picture
- the input picture.f
- the input energy function.
-
-