Microsoft.Zing.FrontierSet.Add C# (CSharp) Méthode

Add() public méthode

public Add ( TraversalInfo ti ) : void
ti TraversalInfo
Résultat void
        public void Add(TraversalInfo ti)
        {
            //no need of adding to the frontier if the final choice bound is reached
            if (ZingerConfiguration.BoundChoices && ti.zBounds.ChoiceCost >= ZingerConfiguration.zBoundedSearch.FinalChoiceCutOff)
            {
                return;
            }

            Fingerprint fp = ti.Fingerprint;
            ti.IsFingerPrinted = true;

            if (ZingerConfiguration.FrontierToDisk)
            {
                if (!nextFrontierSetHT.Contains(fp))
                {
                    FrontierNode fNode = new FrontierNode(ti);
                    counter++;
                    nextFrontierSetHT.Add(fp);
                    //Add the item into current next frontier blocking collection
                    nextFrontierSet.Add(new KeyValuePair<Fingerprint, FrontierNode>(fp, fNode));
                }
            }
            else
            {
                if (!InMemoryNextGlobalFrontier.ContainsKey(fp))
                {
                    FrontierNode fNode = new FrontierNode(ti);
                    //add the item into in memory next frontier
                    InMemoryNextGlobalFrontier.TryAdd(fp, fNode);
                }
            }
        }