本文整理汇总了C#中Match.ExpandMCSMatch方法的典型用法代码示例。如果您正苦于以下问题:C# Match.ExpandMCSMatch方法的具体用法?C# Match.ExpandMCSMatch怎么用?C# Match.ExpandMCSMatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Match
的用法示例。
在下文中一共展示了Match.ExpandMCSMatch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMaxCommonFragmentsNotUsed
public bool GetMaxCommonFragmentsNotUsed(HasseNode Node1, HasseNode Node2, bool dbg,
HasseFragmentInsertionQueue NewFragmentList, int MinimumOverlap)
{
// this Node is directly below both Node1 and Node2
// it can match several places
CountMCS ++;
string strSeed = this.KeyString.Replace("*", "");
string str1 = Node1.KeyString;
string str2 = Node2.KeyString;
bool FoundMCS = false;
// we are only interested in matches strictly larger than seed
if (strSeed.Length + 1 > MinimumOverlap) { MinimumOverlap = strSeed.Length + 1; }
int MatchPosA = GetNextMatch(0,strSeed,str1);
while(MatchPosA>-1){
int MatchPosB = GetNextMatch(0,strSeed,str2);
while(MatchPosB>-1){
Match M = new Match( strSeed,MatchPosA, 0, str1, MatchPosB, 0, str2);
M.ExpandMCSMatch();
//MatchPosA= M.LastPosInA;
//MatchPosB = M.LastPosInB;
string debugInfo = "MCS " + Node1.GetID().ToString () + " " + Node2.GetID().ToString ();
if (true == ProcessMatch(M, MinimumOverlap, NewFragmentList, new HasseNode[2] { Node1, Node2 }, debugInfo))
{ FoundMCS = true; }
MatchPosB = GetNextMatch(MatchPosB +1,strSeed,str2);
}
MatchPosA = GetNextMatch(MatchPosA +1,strSeed,str1);
}
return FoundMCS;
}