static class Vec2{ float x,y; Vec2(){ x = -1; y = -1; } Vec2(float x, float y){ this.x = x; this.y = y; } boolean equals(float x, float y){ if(this.x == x && this.y == y) return true; else return false; } float dist(Vec2 other){ float dx = this.x - other.x; float dy = this.y - other.y; return sqrt(dx*dx + dy*dy); } } static class geoNeuron{ double x,y; double wx,wy; geoNeuron(double x, double y){ this.x = x; this.y = y; this.wx = Math.random(); this.wy = Math.random(); } double dist(geoNeuron c){ double dx = this.x - c.x; double dy = this.y - c.y; return Math.sqrt(dx*dx + dy*dy); } double wdist(geoNeuron c){ double dx = this.wx - c.wx; double dy = this.wy - c.wy; return Math.sqrt(dx*dx + dy*dy); } }