new GoldbergTarjanPushRelabelAlgorithm()
Goldberg Tarjan's Push-Relabel Algorithmus
Extends
Members
(inner) debugConsole
debug states for replay steps to console
(inner) logger :Logger
the logger instance
Type:
(inner) replayHistory :Array
Replay stack, saves all states of the algorithm for rewinding.
Type:
- Array
(inner) residualGraphDrawer
The canvas to draw the residual graph with height and excess axes
(inner) s :Object
status variables
Type:
- Object
(inner) that :GoldbergTarjanPushRelabelAlgorithm
closure variables for this class
Type:
Methods
activate()
tab comes into view
addReplayStep()
add a step to the replay stack, serialize stateful data
deactivate()
tab disappears from view
edgeText()
Displays in the middle of the edge (typically cost/resource vectors or capacity/flow)
- Overrides:
- Source:
getState()
getter for status variable
init()
Init the graph network visualization as well as the secondary visualizaiton layer
nextStepChoice()
Executes the next step in the algorithm
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
reset()
Clear all states
update()
make the view consistent with the state
- Overrides:
- Source:
updateDescriptionAndPseudocode()
updates status description and pseudocode highlight based on current s.id
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
(inner) admissibleRelabel()
checks if we can apply a relabel operation. This mimics and IF, since relabel() returns to outer while loop
(inner) flowWidth()
thickness of edges depending on flow going through
(inner) initDistanceFunction()
initialize the distance function
(inner) initPreflow()
initialize the preflow
(inner) mainLoop()
main loop: pops the current node from the queue until empty
(inner) push()
apply a push operation on the current node
(inner) relabel()
apply a relabel operation on the current node
(inner) selectSource()
select the source node
(inner) selectTarget()
select the target node
(inner) updateResidualEdgesForwardStar()
playback the last step from stack, deserialize stateful data