コード例 #1
0
        private (IGraph, Dictionary <string, int>) Load(string filePath, bool withAnonymization)
        {
            var graph = new UndirectedGraph();

            var adjacencyList = ProcessRawData(filePath);

            var anonymizedNodePairMap = GetMapOfAnonymizedNodes(adjacencyList, withAnonymization);

            foreach (var nodePair in adjacencyList)
            {
                var nodeX = anonymizedNodePairMap[nodePair.Item1];
                var nodeY = anonymizedNodePairMap[nodePair.Item2];

                graph.AddBidirectionEdge(nodeX, nodeY);
            }


            return(graph, anonymizedNodePairMap);
        }