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