예제 #1
0
 /// <summary>
 /// constructor taking a tokeniser to use
 /// </summary>
 /// <param name="tokeniserToUse">the tokeniser to use should a different tokeniser be required</param>
 public MongeElkan(ITokeniser tokeniserToUse)
 {
     tokeniser            = tokeniserToUse;
     internalStringMetric = new SmithWatermanGotoh();
 }
        public void SetUp() {
            LoadData();

            # region SmithWaterman classes
            // 0.5F and SubCostRange1ToMinus2 are the values used for the default constructor
            mySmithWatermanDefault = new SmithWaterman();
            mySmithWatermanCost = new SmithWaterman(0.5D);
            mySmithWatermanCostFunction = new SmithWaterman(new SubCostRange1ToMinus2());
            mySmithWatermanCostAndCostFunction = new SmithWaterman(0.5D, new SubCostRange1ToMinus2());
            #endregion

            // we also need to check running a different set of tests

            #region SmithWatermanGotoh classes
            mySmithWatermanGotohDefault = new SmithWatermanGotoh();
            mySmithWatermanGotohGapCostFunction = new SmithWatermanGotoh(new AffineGapRange5To0Multiplier1());
            mySmithWatermanGotohCostFunction = new SmithWatermanGotoh(new SubCostRange5ToMinus3());
            mySmithWatermanGotohGapCostAndCostFunctions =
                new SmithWatermanGotoh(new AffineGapRange5To0Multiplier1(), new SubCostRange5ToMinus3());
            #endregion

            #region SmithWatermanGotohWindowedAffine classes
            mySWGWADefault = new SmithWatermanGotohWindowedAffine();
            mySWGWAWindowSize = new SmithWatermanGotohWindowedAffine(100);
            mySWGWAGapCostFunction = new SmithWatermanGotohWindowedAffine(new AffineGapRange5To0Multiplier1());
            mySWGWAGapCostFunctionAndWindowSize = new SmithWatermanGotohWindowedAffine(new AffineGapRange5To0Multiplier1(), 100);
            mySWGWAGapCostAndCostFunctions =
                new SmithWatermanGotohWindowedAffine(new AffineGapRange5To0Multiplier1(), new SubCostRange5ToMinus3());
            mySWGWAGapCostAndCostFunctionsAndWindowSize =
                new SmithWatermanGotohWindowedAffine(new AffineGapRange5To0Multiplier1(), new SubCostRange5ToMinus3(), 100);
            mySWGWACostFunction = new SmithWatermanGotohWindowedAffine(new SubCostRange5ToMinus3());
            mySWGWACostFunctionAndWindowSize = new SmithWatermanGotohWindowedAffine(new SubCostRange5ToMinus3(), 100);
            #endregion
        }
예제 #3
0
 /// <summary>
 /// constructor taking a tokeniser to use
 /// </summary>
 /// <param name="tokeniserToUse">the tokeniser to use should a different tokeniser be required</param>
 public MongeElkan(ITokeniser tokeniserToUse) {
     tokeniser = tokeniserToUse;
     internalStringMetric = new SmithWatermanGotoh();
 }