validOrder method
Validates the parameter order before it is used for the first time.
Implementation
List<int> validOrder() {
if ((List.of(_order)..sort()).equal(normalOrder)) {
return _order;
} else {
throw ErrorOf<SearchSpace>(
message: 'The parameter <order> is invalid.',
expectedState: 'A permutation of the normal order: $normalOrder',
invalidState: 'Instead found order = $_order.');
}
}