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