public interface

KnapsackSearchPath

org.apache.helix.controller.strategy.knapsack.KnapsackSearchPath
Known Indirect Subclasses

Class Overview

Construction of the path between search nodes in a knapsack

Based on the C++ knapsack solver in Google's or-tools package.

Summary

Public Methods
abstract KnapsackSearchNode from()
Get the source node
abstract void init()
Initialize the path
abstract KnapsackSearchNode moveUpToDepth(KnapsackSearchNode node, int depth)
Get an ancestor of a given search node
abstract KnapsackSearchNode to()
Get the destination node
abstract KnapsackSearchNode via()
Get the intermediate node

Public Methods

public abstract KnapsackSearchNode from ()

Get the source node

Returns
  • starting KnapsackSearchNode

public abstract void init ()

Initialize the path

public abstract KnapsackSearchNode moveUpToDepth (KnapsackSearchNode node, int depth)

Get an ancestor of a given search node

Parameters
node the search node
depth the depth of the ancestor
Returns
  • the ancestor node

public abstract KnapsackSearchNode to ()

Get the destination node

Returns
  • terminating KnapsackSearchNode

public abstract KnapsackSearchNode via ()

Get the intermediate node

Returns
  • KnapsackSearchNode between source and destination