add java examples
This commit is contained in:
parent
624c92e934
commit
d345f67212
19 changed files with 1208 additions and 0 deletions
27
java/strategy/Neighborhood.java
Normal file
27
java/strategy/Neighborhood.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package patterns.strategy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import patterns.Point;
|
||||
/**
|
||||
*
|
||||
* @author pouyllau
|
||||
*
|
||||
*/
|
||||
public abstract class Neighborhood {
|
||||
protected double step;
|
||||
protected Point pMin;
|
||||
protected Point pMax;
|
||||
protected List<Point> directions;
|
||||
|
||||
|
||||
public Neighborhood(double step, Point pMin, Point pMax) {
|
||||
super();
|
||||
this.step = step;
|
||||
this.pMin = pMin;
|
||||
this.pMax = pMax;
|
||||
}
|
||||
|
||||
public abstract List<Point> get(Point p);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue