This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
/** The class encapsulates an implementation of the Apriori algorithm to compute frequent itemsets. | |
* | |
* This version uses multiple threads to go through the dataset and is therefore 3x faster than the 1 thread version. | |
* | |
* Notice: To enable progress tracking (CLIProgressBar) follow these steps: | |
* 1. download this class and put it on the classpath: https://gist.github.com/lovromazgon/9c801554ceb56157de30 | |
* 2. uncomment lines 229 and 243 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see {@link http://tools.ietf.org/rfc/rfc4503.txt} | |
*/ | |
public class Rabbit { | |
private static final int[] A = new int[] { 0x4D34D34D, 0xD34D34D3, 0x34D34D34, 0x4D34D34D, 0xD34D34D3, 0x34D34D34, 0x4D34D34D, 0xD34D34D3 }; | |
private static final long MAX_UNSIGNED_INT = Integer.MAX_VALUE * 2l + 2; //2^32 | |
private static final boolean DEBUG = false; | |
private int[] X; | |
private int[] C; |