
util.parallel.ParallelRangeOp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xfvrp Show documentation
Show all versions of xfvrp Show documentation
Solver for realistic vehicle routing problems
package util.parallel;
/**
* Copyright (c) 2012-present Holger Schneider
* All rights reserved.
*
* This source code is licensed under the MIT License (MIT) found in the
* LICENSE file in the root directory of this source tree.
*
*
* @author hschneid
*
* @param
*/
public abstract class ParallelRangeOp implements Runnable, Cloneable {
private E start, end;
public ParallelRangeOp() {}
public abstract void run(E start, E end);
/*
* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
@Override
public void run() {
try {
if(start != null && end != null)
run(start, end);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
* @param start
* @param end
*/
void set(E start, E end) {
this.start = start;
this.end = end;
}
/**
*
* @return
* @throws CloneNotSupportedException
*/
@SuppressWarnings("unchecked")
public ParallelRangeOp copy() throws CloneNotSupportedException {
return (ParallelRangeOp) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy