package org.apache.bigtop.bazaar.datagenerator.latentvariablemodel;

import java.util.Arrays;

public class BoothRecommendations
{
	int products;
	int users;
	double[][] matrix;
	
	public BoothRecommendations(int products, int users, double fillValue)
	{
		this.products = products;
		this.users = users;
		matrix = new double[users][products];
		
		for(int i = 0; i < users; i++)
		{
			Arrays.fill(matrix[i], fillValue);
		}
	}
	
	public double getRating(int product, int user)
	{
		return matrix[user][product];
	}
	
	public double[] getRatings(int user)
	{
		return matrix[user];
	}
	
	public int getProducts()
	{
		return products;
	}
	
	public int getUsers()
	{
		return users;
	}
}

@@ -324,22 +324,22 @@
 ble%5B
-users%5D%5B
 product
+s%5D%5Buser
 s%5D;%0A
@@ -362,20 +362,23 @@
  0; i %3C 
-user
+product
 s; i++)%0A
@@ -499,22 +499,16 @@
 rix%5B
-user%5D%5B
 product%5D
 ;%0A%09%7D
@@ -503,16 +503,22 @@
 product%5D
+%5Buser%5D
 ;%0A%09%7D%0A%09%0A%09
@@ -544,28 +544,31 @@
 Ratings(int 
-user
+product
 )%0A%09%7B%0A%09%09retur
@@ -576,20 +576,23 @@
  matrix%5B
-user
+product
 %5D;%0A%09%7D%0A%09%0A

Change BoothRecommendations interface