ParkMillerXlw::ParkMillerXlw(ArgumentList args)
	:RandomBaseXlw(static_cast<unsigned long>(args.GetDoubleArgumentValue("dim")))
{
	if (args.GetStructureName() != "rng")
		throw("rng structure expected in ParkMillerXlw  class");

	if (args.GetStringArgumentValue("name") == "park miller"){
		ParkMiller _rng; InnerGenerator = _rng;
		Reciprocal = 1 / (1.0 + InnerGenerator.Max());
	}

	else throw("name list not for antithetic passed to ParkMillerXlw  : got " + args.GetStringArgumentValue("name"));
	
	Seed = static_cast<unsigned long>(args.GetDoubleArgumentValue("seed"));

	if (args.GetStructureName() != "seed") 	Seed = 1;

	args.CheckAllUsed("ParkMillerXlw");

	ResetDimensionality(static_cast<unsigned long>(args.GetDoubleArgumentValue("dim")));

}
AntiTheticXlw::AntiTheticXlw(ArgumentList args)
	:RandomBaseXlw()
{

	if (args.GetStructureName() != "rng")
		throw("rng structure expected in AntiTheticXlw  class");

	if (args.GetStringArgumentValue("name") != "antithetic")
		throw("rng list not for antithetic passed to AntiTheticXlw  : got " + args.GetStringArgumentValue("name"));

	InnerGenerator = Wrapper<RandomBaseXlw>(GetFromFactory<RandomBaseXlw>(args.GetArgumentListArgumentValue("innergenerator")));
	
	
	OddEven = true;
	NextVariates.resize(GetDimensionality());

	ResetDimensionality(InnerGenerator->GetDimensionality());

	args.CheckAllUsed("AntiTheticXlw ");
}