de.heineken.studienarbeit

Class SSTF


public class SSTF
extends Algorithmus

implements the algorithm "Shortest Seek Time First".

Field Summary

private int
anfangszahl

Fields inherited from class de.heineken.studienarbeit.Algorithmus

eingabe, eingabegroesse, fortschrittszeiger, puffer, puffergroesse

Constructor Summary

SSTF(int puffergroesse, int[] eingabe, int anfangszahl)
Constructor for the algorithm; sets input numbers

Method Summary

private int
minimaledistanz(int anfangszahl)
The method Minimaldistanz looks for the min.
int[]
run()
the method run starts the algorithm´s work

Methods inherited from class de.heineken.studienarbeit.Algorithmus

getpufferzahl, ladepuffer, run

Field Details

anfangszahl

private int anfangszahl

Constructor Details

SSTF

public SSTF(int puffergroesse,
            int[] eingabe,
            int anfangszahl)
Constructor for the algorithm; sets input numbers
Parameters:

Method Details

minimaledistanz

private int minimaledistanz(int anfangszahl)
The method Minimaldistanz looks for the min. distance from one number to an other
Parameters:
anfangszahl - , current position of the head

run

public int[] run()
the method run starts the algorithm´s work
Overrides:
run in interface Algorithmus