internal virtual FuzzySet GetOrAddHedgedSet(string setName, string hedges)
{
string hedgeName = setName + " " + hedges;
// The base set must, of course, exist!
if (!SetExist(setName))
{
Console.Out.WriteLine("Error: Unknown Set " + msName + " " + setName);
}
// If the hedged set already exists, simply return it.
if (SetExist(hedgeName))
{
return GetSet(hedgeName);
}
// The hedged set does not exist; create it.
// Attempt to create a clone of the specified set.
((FuzzySet)(moSetList[setName])).AddClone(hedgeName);
// Clone was created and added to the set list;
// Now apply the hedges to the clone.
((FuzzySet)(moSetList[hedgeName])).ApplyHedges(hedges);
// Now return the newly created hedged set.
return GetSet(hedgeName);
}