java.lang.Object
org.jhotdraw8.graph.path.backlink.AbstractBackLink<VertexBackLink<V>>
org.jhotdraw8.graph.path.backlink.VertexBackLink<V>
- Type Parameters:
V- the vertex data type
Represents a vertex back link with depth.
-
Field Summary
Fields inherited from class org.jhotdraw8.graph.path.backlink.AbstractBackLink
depth, parent -
Constructor Summary
ConstructorsConstructorDescriptionVertexBackLink(@NonNull V vertex, @Nullable VertexBackLink<V> parent) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic <VV,CC extends Number & Comparable<CC>>
@Nullable VertexBackLinkWithCost<VV, CC> toVertexBackLinkWithCost(@Nullable VertexBackLink<VV> node, @NonNull CC zero, @NonNull BiFunction<VV, VV, CC> costFunction, @NonNull BiFunction<CC, CC, CC> sumFunction) Converts anVertexBackLinktoVertexBackLinkWithCost.Methods inherited from class org.jhotdraw8.graph.path.backlink.AbstractBackLink
getDepth, getParent
-
Constructor Details
-
VertexBackLink
Creates a new instance.- Parameters:
vertex- the vertex dataparent- the parent back link
-
-
Method Details
-
getVertex
-
toVertexBackLinkWithCost
public static <VV,CC extends Number & Comparable<CC>> @Nullable VertexBackLinkWithCost<VV,CC> toVertexBackLinkWithCost(@Nullable VertexBackLink<VV> node, @NonNull CC zero, @NonNull BiFunction<VV, VV, CC> costFunction, @NonNull BiFunction<CC, CC, CC> sumFunction) Converts anVertexBackLinktoVertexBackLinkWithCost.- Type Parameters:
VV- the vertex data typeCC- the cost number type- Parameters:
node- theVertexBackLinkzero- the zero cost valuecostFunction- the cost functionsumFunction- the sum function for cost values- Returns:
- the converted
VertexBackLinkWithCost
-