Analyzer.DConnectorMotifDetector.tryPartition C# (CSharp) Method

tryPartition() public method

public tryPartition ( IGraph graph, BackgroundWorker bgw, Groups &results ) : bool
graph IGraph
bgw System.ComponentModel.BackgroundWorker
results Groups
return bool
        public override bool tryPartition(IGraph graph, BackgroundWorker bgw, out Groups results)
        {
            ICollection<Motif> oMotifs;
            Groups oGroups;
            int i = 0;
            bool rv = TryCalculateDConnectorMotifs(graph, m_iDMinimum, m_iDMaximum, bgw, out oMotifs);
            if (rv == true)
            {
                oGroups = new Groups(oMotifs.Count);
                foreach (Motif m in oMotifs)
                {
                    oGroups.Add(i, (DConnectorMotif)m);
                    i++;
                }
            }
            else oGroups = new Groups(1);
            results = oGroups;
            return rv;
        }