package aalgTest;

import java.math.BigInteger;
import java.util.Random;

import aalg.algebra.Cube;
import aalg.algebra.DlDomainParameters;
import aalg.algebra.IGroup;
import aalg.algebra.Matrix;
import aalg.algebra.MultiGroup;
import aalg.algebra.MultiMonoid;
import aalg.algebra.MultiMonoidElement;
import aalg.algebra.PrimeField;
import aalg.algebra.PrimeFieldElement;
import aalg.algebra.PrimeMultiGroupGenerator;
import aalg.algebra.RationalMultiMonoidGenerator;
import aalg.algebra.VectorImpl;

public class MultiGroupCreator implements IGroupCreator<MultiMonoidElement<PrimeFieldElement>> {

	private final PrimeMultiGroupGenerator groupGenerator;
	
	private final static int SIZE = 2;
	private final static int MIN_VAL = -2;
	private final static int MAX_VAL = 2;

	
	public MultiGroupCreator (final BigInteger minPrime) {
		final Random rnd = new Random(1234);
		
		final RationalMultiMonoidGenerator rationalMonoidGenerator = new RationalMultiMonoidGenerator(SIZE, MIN_VAL, MAX_VAL, rnd);
		this.groupGenerator = new PrimeMultiGroupGenerator(rationalMonoidGenerator, minPrime, rnd);
	}
		
	@Override
	public DlDomainParameters<MultiMonoidElement<PrimeFieldElement>> createGroup() {
		return groupGenerator.generate();
	}

}
