1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package org.supercsv.datacreators;
18  
19  import java.io.FileWriter;
20  import java.io.IOException;
21  
22  import org.junit.Ignore;
23  import org.junit.Test;
24  import org.supercsv.io.CsvListWriter;
25  import org.supercsv.prefs.CsvPreference;
26  
27  
28  public class SparseDataCreator {
29  
30  	@Ignore("This is a test only for convenience")
31  	@Test
32  	public void CreateSparseNumericData() throws IOException
33  	{
34  		FileWriter f = new FileWriter("SparseNumbersOnly.csv"); 
35  		CsvListWriter ff = new CsvListWriter(f, CsvPreference.STANDARD_PREFERENCE);
36  		
37  		final int rowsToProduce = 1000000;
38  		int j = 33;
39  		for(int i = 0; i < rowsToProduce; i++)
40  		{
41  			if(j == 0) j = 2;
42  			ff.write(i, i*j, i/(double)j);
43  			j = i*j % 1843;
44  		}
45  		ff.close();
46  	}
47  }