Esempio n. 1
0
 // ----------------------------------------------------------------------------------------
 /// <!-- Match -->
 /// <summary>
 ///      Match two profiles, saving the results internally
 /// </summary>
 /// <param name="matchProfile"></param>
 internal void Match(EndemeProfile matchProfile)
 {
     for (int i = 0; i < this.Segment.Count; ++i)
     {
         EndemeSet enSet = this.Segment[i].EnSet;
         if (matchProfile.Contains(enSet))
         {
             EndemeItem segment2 = matchProfile[enSet];
             EndemeItem segment1 = Segment[i];
             segment1.TempMatch = segment1.ItemEndeme.Match(segment2.ItemEndeme, WeightFormula.Refined);
             //TempMatch[i] = segment1.ItemEndeme.Match(segment2.ItemEndeme, WeightFormula.Refined);
         }
     }
 }
        // ----------------------------------------------------------------------------------------
        /// <!-- PartNotHaving -->
        /// <summary>
        ///
        /// </summary>
        /// <param name="enSet"></param>
        /// <returns></returns>
        internal EndemeDefinition PartNotHaving(EndemeSet enSet)
        {
            EndemeDefinition output = new EndemeDefinition(this.Label, this.EnRef);

            foreach (Guid key in this._order)
            {
                EndemeProfile profile = this[key].ItemProfile;
                if (!profile.Contains(enSet))
                {
                    output.Add(key, _list[key]);
                }
            }
            return(output);
        }