/// <summary> /// Setup the group and refiner; it is important to call this method before /// calling <see cref="Refine(Partition)"/> otherwise the refinement process will fail. /// </summary> /// <param name="group">a group (possibly empty) of automorphisms</param> /// <param name="refiner">the equitable refiner</param> public void Setup(PermutationGroup group, EquitablePartitionRefiner refiner) { this.bestExist = false; this.best = null; this.group = group; this.equitableRefiner = refiner; }
public void Cube2eneWithBonds() { AtomRefinable ar = Make(Cubene(), false); EquitablePartitionRefiner refiner = new EquitablePartitionRefiner(ar); Partition finer = refiner.Refine(Partition.Unit(8)); Partition expected = Partition.FromString("0,2,5,7|1,3,4,6"); Assert.AreEqual(expected, finer); }
public void Cube2eneWithoutBonds() { AtomRefinable ar = Make(Cubene(), true); EquitablePartitionRefiner refiner = new EquitablePartitionRefiner(ar); Partition finer = refiner.Refine(Partition.Unit(8)); Partition expected = Partition.Unit(8); Assert.AreEqual(expected, finer); }
public void RefineTest() { EquitablePartitionRefiner refiner = new EquitablePartitionRefiner(MakeExampleTable()); Partition coarser = Partition.FromString("[0|1,2,3]"); Partition finer = refiner.Refine(coarser); Partition expected = Partition.FromString("[0|1,2|3]"); Assert.AreEqual(expected, finer); }
/// <summary> /// A refiner - it is necessary to call <see cref="Setup(PermutationGroup, EquitablePartitionRefiner)"/> before use. /// </summary> protected AbstractDiscretePartitionRefiner() { this.bestExist = false; this.best = null; this.equitableRefiner = null; }
public void ConstructorTest() { EquitablePartitionRefiner refiner = new EquitablePartitionRefiner(MakeExampleTable()); Assert.IsNotNull(refiner); }