Example #1
0
        public Vector PageRank(double damping = 0.85, Vector weights = null)
        {
            var vec = new Vector(Vertices);
            var all = new igraph_vs_t();

            DllImporter.igraph_vs_all(ref all);
            try {
                double eigenv = 0;
                DllImporter.igraph_pagerank(graph, igraph_pagerank_algo_t.IGRAPH_PAGERANK_ALGO_PRPACK, vec.NativeInstance, out eigenv, all, IsDirected, damping, weights != null ? weights.NativeInstance : null);
            } finally {
                DllImporter.igraph_vs_destroy(ref all);
            }
            return(vec);
        }