本文整理汇总了C#中StringDictionary.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# StringDictionary.SetValue方法的具体用法?C# StringDictionary.SetValue怎么用?C# StringDictionary.SetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringDictionary
的用法示例。
在下文中一共展示了StringDictionary.SetValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildQuotientMDP
//.........这里部分代码省略.........
string w = nonProbTrans[j].ID;
if (w == v)
{
selfLoop = true;
}
if (!visited.GetContainsKey(w))
{
if (preorder[w] > preorderV)
{
lowlinkV = Math.Min(lowlinkV, lowlink[w]);
}
else
{
lowlinkV = Math.Min(lowlinkV, preorder[w]);
}
}
else //in this case, there is a tau transition leading to an SCC; must add the transition into the toReturn automaton
{
BoundaryOneTransition.Add(new KeyValuePair<string, string>(v, w));
}
}
lowlink[v] = lowlinkV;
TaskStack.Pop();
HashSet<string> scc = new HashSet<string>();
if (lowlinkV == preorderV)
{
scc.Add(v);
visited.SetValue(v, true);
while (stepStack.Count > 0 && preorder[stepStack.Peek().ID] > preorderV)
{
string s = stepStack.Pop().ID;
scc.Add(s);
visited.SetValue(s, true);
}
MDPState newstate = new MDPState(toReturn.States.Count.ToString());
if (scc.Count > 1 || (scc.Count == 1 && selfLoop))
{
newstate.AddDistribution(new Distribution(Constants.TAU, newstate)); //add self loop: sun jun
}
sccs.Add(new KeyValuePair<HashSet<string>, MDPState>(scc, newstate));
toReturn.AddState(newstate);
if (scc.Contains(InitState.ID))
{
toReturn.SetInit(newstate);
}
foreach (MDPState state in TargetStates)
{
if (scc.Contains(state.ID))
{
toReturn.AddTargetStates(newstate);
}
}
}
else
示例2: InsertKeyRef
private void InsertKeyRef(ITransaction t, string key, string value, long[] uid)
{
IDataFile keyListDf = t.GetFile(KeyUidMapKey, FileAccess.ReadWrite);
StringDictionary keyList = new StringDictionary(keyListDf);
// Put it in the property set,
if (value == null) {
keyList.SetValue(key, null);
} else {
keyList.SetValue(key, ToUidString(uid[0], uid[1]));
}
}