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.Pixelvertices andEnergyFunction-weighted edges.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAdjacencyListSeamFinder.PixelGraph.PixelA pixel in theAdjacencyListSeamFinder.PixelGraphrepresentation of thePicturewithEnergyFunction-weighted edges to neighbors.
-
Field Summary
Fields Modifier and Type Field Description private EnergyFunctionfThePictureforneighbors(Node).private PicturepictureThePictureforneighbors(Node).private AdjacencyListSeamFinder.PixelGraph.Pixel[][]pixelsTheAdjacencyListSeamFinder.PixelGraph.Pixelvertices in thePicture.private NodesinkSinkNodefor the adjacency list graph.private NodesourceSourceNodefor the adjacency list graph.
-
Constructor Summary
Constructors Modifier Constructor Description privatePixelGraph(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.Pixelvertices in thePicture.
-
picture
private final Picture picture
ThePictureforneighbors(Node).
-
f
private final EnergyFunction f
ThePictureforneighbors(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.
-
-