コード例 #1
0
            // MinRemMatchLen and MaxRemMatchLen are calculated on the fly during the matching process

            // DEZE UITEINDELIJK GEBRUIKEN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            // DENK AAN CopyEx()
            public ListPatternElem(DownRepFactor downRepFactor, DisjunctiveSearchTerm altSearchTerms, AcrossRepFactor acrossRepFactor)
                : base("RANGE") // used by CopyEx
            {
                this.downRepFactor   = downRepFactor;
                this.altSearchTerms  = altSearchTerms;
                this.acrossRepFactor = acrossRepFactor;

                int n = TARGETOFFSET + (altSearchTerms == null ? 1 : altSearchTerms.Count);

                args = new BaseTerm [n];

                args [0] = HasAcrossRepFactor ? acrossRepFactor.minLenTerm : DecimalTerm.ZERO;
                args [1] = HasAcrossRepFactor ? acrossRepFactor.maxLenTerm : DecimalTerm.ZERO;
                args [2] = HasAcrossRepFactor ? acrossRepFactor.bindVar : null;
                args [3] = HasAltSearchTerms ? altSearchTerms.bindVar : null;

                int i = TARGETOFFSET;

                if (altSearchTerms != null)
                {
                    foreach (BaseTerm t in altSearchTerms.alternatives)
                    {
                        args [i++] = t;
                    }
                }

                isNegSearch = (altSearchTerms == null) ? false : altSearchTerms.isNegSearch;
            }
コード例 #2
0
      public DisjunctiveSearchTerm (DisjunctiveSearchTerm t)
      {
        alternatives = new BaseTerm [t.Count];

        for (int i = 0; i < t.Count; i++)
          alternatives [i] = t.alternatives [i].Copy ();

        bindVar = (Variable)(t.bindVar.Copy ());
        isNegSearch = t.isNegSearch;
      }
コード例 #3
0
            public DisjunctiveSearchTerm(DisjunctiveSearchTerm t)
            {
                alternatives = new BaseTerm[t.Count];

                for (int i = 0; i < t.Count; i++)
                {
                    alternatives[i] = t.alternatives[i].Copy();
                }

                bindVar     = (Variable)(t.bindVar.Copy());
                isNegSearch = t.isNegSearch;
            }
コード例 #4
0
      // MinRemMatchLen and MaxRemMatchLen are calculated on the fly during the matching process

      // DEZE UITEINDELIJK GEBRUIKEN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      // DENK AAN CopyEx()
      public ListPatternElem (DownRepFactor downRepFactor, DisjunctiveSearchTerm altSearchTerms, AcrossRepFactor acrossRepFactor)
        : base ("RANGE")  // used by CopyEx
      {
        this.downRepFactor = downRepFactor;
        this.altSearchTerms = altSearchTerms;
        this.acrossRepFactor = acrossRepFactor;
        
        int n = TARGETOFFSET + (altSearchTerms == null ? 1 : altSearchTerms.Count);
        args = new BaseTerm [n];

        args [0] = HasAcrossRepFactor ? acrossRepFactor.minLenTerm : DecimalTerm.ZERO;
        args [1] = HasAcrossRepFactor ? acrossRepFactor.maxLenTerm : DecimalTerm.ZERO;
        args [2] = HasAcrossRepFactor ? acrossRepFactor.bindVar : null;
        args [3] = HasAltSearchTerms ? altSearchTerms.bindVar : null;

        int i = TARGETOFFSET;

        if (altSearchTerms != null)
          foreach (BaseTerm t in altSearchTerms.alternatives)
            args [i++] = t;

        isNegSearch = (altSearchTerms == null) ? false : altSearchTerms.isNegSearch;
      }