public class QuicksortSolution extends AbstractDivideAndConquerSolution<QuicksortSolution>
Constructor and Description |
---|
QuicksortSolution(int low,
int high,
int... numbers)
An implementation of a quicksort solution.
|
QuicksortSolution(int identifier,
int low,
int high,
int... numbers) |
Modifier and Type | Method and Description |
---|---|
QuicksortSolution |
combine(QuicksortSolution otherSolution)
Method to join the given inputs together and send to the output port.
|
int |
getHigh() |
int |
getLow() |
int[] |
getNumbers() |
String |
toString() |
getID
public QuicksortSolution(int low, int high, int... numbers)
low
- Pointer to the lower bound of indices to be compared in the arrayhigh
- Pointer to the upper bound of indices to be compared in the arraynumbers
- Array to be sortedpublic QuicksortSolution(int identifier, int low, int high, int... numbers)
public int getLow()
public int getHigh()
public int[] getNumbers()
public QuicksortSolution combine(QuicksortSolution otherSolution)
AbstractDivideAndConquerSolution
combine
in class AbstractDivideAndConquerSolution<QuicksortSolution>
otherSolution
- The solution to combine this one with.Copyright © 2015–2020. All rights reserved.