public When_mine_is_called_the_apriori_algorithm() { var mockFactsGenerators = new List <IFactsGenerator <string> >() { new MockFactsGenerator() }; apriori = new Apriori <string>(new SelfJoinAndPruneGenerator <string>(), mockFactsGenerators); factA = new MockSimpleFact("A"); factB = new MockSimpleFact("B"); factC = new MockSimpleFact("C"); }
public int CompareTo(IFact <T> that) { if (that == null) { return(-1); } if (!Object.ReferenceEquals(this.GetType(), that.GetType())) { return(this.GetType().ToString().CompareTo(that.GetType().ToString())); } else { return(CompareSameFact(that)); } }
private bool HasImplication(IFact <T> fact1, IFact <T> fact2) { return(fact1.Implies(fact2) || fact2.Implies(fact1)); }
public When_GeneratePowerSet_is_called() { factA = new MockSimpleFact("A"); factB = new MockSimpleFact("B"); factC = new MockSimpleFact("C"); }
public virtual int CompareSameFact(IFact <T> that) { return(this.Value.CompareTo(that.Value)); }
public abstract bool Implies(IFact <T> that);