public static LinkedList<Dist>[] getDistNearestMatrix(Node[] nodes){
		LinkedList<Dist>[] mtrx = new LinkedList[nodes.length];
		
		for (int i = 0; i < nodes.length; i++) {
			mtrx[i] = new LinkedList<Dist>();
		}
		
		for (short i = 0; i < nodes.length; i++) {
			for (short j = 0; j < nodes.length; j++) {
				if(i==j )
					continue;
				
				double distance = nodes[i].sqDistance(nodes[j]);
				
				mtrx[i].add(new Dist(i, j, distance));
			}
			Collections.sort(mtrx[i]);
		}
		return mtrx;
		
	}