de.heineken.studienarbeit
Class ScanDisk
implements the algorithm "Scan Disk".
ScanDisk(int puffergroesse, int[] eingabe, int anfangszahl, boolean richtung) - Constructor of the Algorithm
|
private int | minimaledistanz(int anfangszahl, boolean richtung) - The method Minimaldistanz computes for the min.
|
int[] | run() - run starts the algorithms work
|
anfangszahl
private int anfangszahl
richtung
private boolean richtung
ScanDisk
public ScanDisk(int puffergroesse,
int[] eingabe,
int anfangszahl,
boolean richtung)
Constructor of the Algorithm
minimaledistanz
private int minimaledistanz(int anfangszahl,
boolean richtung)
The method Minimaldistanz computes for the min. distance from one number
to an other
anfangszahl
- , current position of the headrichtung
- in which direction the head currently moves
- index of the element in the buffer that is next to the current position
run
public int[] run()
run starts the algorithms work
- run in interface Algorithmus
- gives back correct number