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

				calculationResult[1] += Math.pow((usersForMoviej[indexForJ].rate - usersForMoviej[indexForJ].avgRating),
						2);
				calculationResult[2] += Math.pow((usersForMoviei[indexForI].rate - usersForMoviei[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<ItemNeighbour> iNeighbourhood = similarityNieghbour.get(iID);
				iNeighbourhood.add(new ItemNeighbour(jID, weightIJ));
			}else{
				ArrayList<ItemNeighbour> iNeighbourhood = new ArrayList<ItemNeighbour>();
				iNeighbourhood.add(new ItemNeighbour(jID, weightIJ));
				similarityNieghbour.put(iID, iNeighbourhood);
			}
		}	
	}