java.lang.Object
org.jhotdraw8.graph.path.backlink.AbstractBackLink<IndexedVertexBackLink>
org.jhotdraw8.graph.path.backlink.IndexedVertexBackLink
Represents an indexed vertex back link with depth.
-
Field Summary
Fields inherited from class org.jhotdraw8.graph.path.backlink.AbstractBackLink
depth, parent -
Constructor Summary
ConstructorsConstructorDescriptionIndexedVertexBackLink(int vertex, @Nullable IndexedVertexBackLink parent) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionintstatic <CC extends Number & Comparable<CC>>
@Nullable IndexedVertexBackLinkWithCost<CC> toIndexedVertexBackLinkWithCost(@Nullable IndexedVertexBackLink node, @NonNull CC zero, @NonNull BiFunction<Integer, Integer, CC> costFunction, @NonNull BiFunction<CC, CC, CC> sumFunction) Converts anIndexedVertexBackLinktoIndexedVertexBackLinkWithCost.Methods inherited from class org.jhotdraw8.graph.path.backlink.AbstractBackLink
getDepth, getParent
-
Constructor Details
-
IndexedVertexBackLink
Creates a new instance.- Parameters:
vertex- the vertex indexparent- the parent back link
-
-
Method Details
-
getVertex
public int getVertex() -
toIndexedVertexBackLinkWithCost
public static <CC extends Number & Comparable<CC>> @Nullable IndexedVertexBackLinkWithCost<CC> toIndexedVertexBackLinkWithCost(@Nullable IndexedVertexBackLink node, @NonNull CC zero, @NonNull BiFunction<Integer, Integer, CC> costFunction, @NonNull BiFunction<CC, CC, CC> sumFunction) Converts anIndexedVertexBackLinktoIndexedVertexBackLinkWithCost.- Type Parameters:
CC- the cost number type- Parameters:
node- theIndexedVertexBackLinkzero- the zero cost valuecostFunction- the cost functionsumFunction- the sum function for cost values- Returns:
- the converted
IndexedVertexBackLinkWithCost
-