Analyzer.EdgeReciprocationCalculator.tryAnalyze C# (CSharp) Method

tryAnalyze() public method

public tryAnalyze ( IGraph graph, BackgroundWorker bgw, AnalyzeResultBase &results ) : bool
graph IGraph
bgw System.ComponentModel.BackgroundWorker
results AnalyzeResultBase
return bool
        public override bool tryAnalyze(IGraph graph, BackgroundWorker bgw, out AnalyzeResultBase results)
        {
            Dictionary<Int32, Boolean> graphMetrics;
            EdgeReciprocation oEdgeReciprocation;
            bool rv = TryCalculateGraphMetrics(graph, m_obackgroundWorker, out graphMetrics);
            if (rv == true)
            {
                oEdgeReciprocation = new EdgeReciprocation(graphMetrics.Count);
                foreach (KeyValuePair<Int32, Boolean> p in graphMetrics)
                    oEdgeReciprocation.Add(p.Key, p.Value);
            }
            else oEdgeReciprocation = new EdgeReciprocation(1);
            results = oEdgeReciprocation;
            return rv;
        }