Class: GoldbergTarjanPushRelabelAlgorithm

GoldbergTarjanPushRelabelAlgorithm

new GoldbergTarjanPushRelabelAlgorithm()

Goldberg Tarjan's Push-Relabel Algorithmus
Author:
  • Adrian Haarbach
Source:

Extends

Members

(inner) debugConsole

debug states for replay steps to console
Source:

(inner) logger :Logger

the logger instance
Type:
Source:

(inner) replayHistory :Array

Replay stack, saves all states of the algorithm for rewinding.
Type:
  • Array
Source:

(inner) residualGraphDrawer

The canvas to draw the residual graph with height and excess axes
Source:

(inner) s :Object

status variables
Type:
  • Object
Source:

(inner) that :GoldbergTarjanPushRelabelAlgorithm

closure variables for this class
Type:
Source:

Methods

activate()

tab comes into view
Source:

addReplayStep()

add a step to the replay stack, serialize stateful data
Source:

deactivate()

tab disappears from view
Source:

edgeText()

Displays in the middle of the edge (typically cost/resource vectors or capacity/flow)
Overrides:
Source:

getState()

getter for status variable
Source:

init()

Init the graph network visualization as well as the secondary visualizaiton layer
Source:

nextStepChoice()

Executes the next step in the algorithm
Source:

nodeLabel()

Displays inside of a node (typically its id)
Overrides:
Source:

nodeText()

Displays on top of a node (typically constraints or state variables)
Inherited From:
Source:

nodeX()

X Position of a node
Inherited From:
Source:

nodeY()

Y Position of a node
Inherited From:
Source:

onEdgesEntered()

Called when new edges are entering
Overrides:
Source:

onEdgesUpdated()

Called when exisitng edges are updated
Overrides:
Source:

onNodesEntered()

Called when new nodes are entering
Overrides:
Source:

onNodesUpdated()

Called when exisitng nodes are updated
Overrides:
Source:

previousStepChoice()

playback the last step from stack, deserialize stateful data
Source:

reset()

Clear all states
Source:

update()

make the view consistent with the state
Overrides:
Source:

updateDescriptionAndPseudocode()

updates status description and pseudocode highlight based on current s.id
Source:

updateEdges()

D3's Data Join of edge data with their visualization (lines)
Inherited From:
Source:

updateNodes()

D3's Data Join of node data with their visualization (circles)
Inherited From:
Source:

(inner) admissiblePush()

checks if we can apply a push operation. Together with push() mimics the inner WHILE loop
Source:

(inner) admissibleRelabel()

checks if we can apply a relabel operation. This mimics and IF, since relabel() returns to outer while loop
Source:

(inner) flowWidth()

thickness of edges depending on flow going through
Source:

(inner) initDistanceFunction()

initialize the distance function
Source:

(inner) initPreflow()

initialize the preflow
Source:

(inner) mainLoop()

main loop: pops the current node from the queue until empty
Source:

(inner) push()

apply a push operation on the current node
Source:

(inner) relabel()

apply a relabel operation on the current node
Source:

(inner) selectSource()

select the source node
Source:

(inner) selectTarget()

select the target node
Source:

(inner) updateResidualEdgesForwardStar()

playback the last step from stack, deserialize stateful data
Source: