public void compute(long iID, long jID, PostingMovie[] moviesForUseri, PostingMovie[] moviesForUserj, Boolean own){
		int indexForI = 0;
		int indexForJ = 0;
		float [] calculationResult = new float[3];
		while((indexForI<moviesForUseri.length)&&(indexForJ<moviesForUserj.length)){
			if(moviesForUseri[indexForI].movieID<moviesForUserj[indexForJ].movieID){
				indexForI++;
			}else if(moviesForUseri[indexForI].movieID>moviesForUserj[indexForJ].movieID){
				indexForJ++;
			}else{
				// + songjUsers[jPoint].avgRating + ")");
				calculationResult[0] += ((moviesForUseri[indexForI].rate - moviesForUseri[indexForI].avgRating) * (moviesForUserj[indexForJ].rate - moviesForUserj[indexForJ].avgRating));

				calculationResult[1] += Math.pow((moviesForUserj[indexForJ].rate - moviesForUserj[indexForJ].avgRating),
						2);
				calculationResult[2] += Math.pow((moviesForUseri[indexForI].rate - moviesForUseri[indexForI].avgRating),
						2);
				indexForI++;
				indexForJ++;
				
			}
		}
		float weightIJ = (float) (calculationResult[0] / Math.sqrt(calculationResult[1] * calculationResult[2]));
		if(calculationResult[0]!=0){
//			if(own){
//				addNeighbour(iID, jID, weightIJ);
//				addNeighbour(jID, iID, weightIJ);
//			}else{
//				addNeighbour(iID, jID, weightIJ);
//			}
			//get wij
			if(similarityNieghbour.containsKey(iID)){
				ArrayList<UserNeighbour> iNeighbourhood = similarityNieghbour.get(iID);
				iNeighbourhood.add(new UserNeighbour(jID, weightIJ));
			}else{
				ArrayList<UserNeighbour> iNeighbourhood = new ArrayList<UserNeighbour>();
				iNeighbourhood.add(new UserNeighbour(jID, weightIJ));
				similarityNieghbour.put(iID, iNeighbourhood);
			}
		}	
	}