internal static void igraph_vector_fill(igraph_vector_t vector, double v) { if (X86) { igraph_vector_fill_x86(vector, v); } else { igraph_vector_fill_x64(vector, v); } }
internal static void igraph_vector_scale(igraph_vector_t vector, double by) { if (X86) { igraph_vector_scale_x86(vector, by); } else { igraph_vector_scale_x64(vector, by); } }
internal static void igraph_vector_destroy(igraph_vector_t vector) { if (X86) { igraph_vector_destroy_x86(vector); } else { igraph_vector_destroy_x64(vector); } }
internal static void igraph_vector_set(igraph_vector_t vector, int index, double value) { if (X86) { igraph_vector_set_x86(vector, index, value); } else { igraph_vector_set_x64(vector, index, value); } }
internal static double[] igraph_vector_to_array(igraph_vector_t from) { var len = igraph_vector_size(from); var result = new double[len]; if (X86) { igraph_vector_copy_to_x86(from, result); } else { igraph_vector_copy_to_x64(from, result); } return(result); }
private static extern double igraph_vector_e_x64(igraph_vector_t vector, int index);
private static extern int igraph_vector_size_x64(igraph_vector_t vector);
private static extern int igraph_dfs_x64(igraph_t graph, int root, igraph_neimode_t mode, bool unreachable, [In, Out] igraph_vector_t order, [In, Out] igraph_vector_t order_out, [In, Out] igraph_vector_t father, [In, Out] igraph_vector_t dist, igraph_dfshandler_t in_callback, igraph_dfshandler_t out_callback, IntPtr extra);
private static extern int igraph_layout_kamada_kawai_x64(igraph_t graph, [In, Out] igraph_matrix_t res, bool use_seed, int maxiter, double epsilon, double kkconst, igraph_vector_t weights, igraph_vector_t minx, igraph_vector_t maxx, igraph_vector_t miny, igraph_vector_t maxy);
internal static int igraph_layout_kamada_kawai(igraph_t graph, igraph_matrix_t res, bool use_seed, int maxiter, double epsilon, double kkconst, igraph_vector_t weights, igraph_vector_t minx, igraph_vector_t maxx, igraph_vector_t miny, igraph_vector_t maxy) { return(X86 ? igraph_layout_kamada_kawai_x86(graph, res, use_seed, maxiter, epsilon, kkconst, weights, minx, maxx, miny, maxy) : igraph_layout_kamada_kawai_x64(graph, res, use_seed, maxiter, epsilon, kkconst, weights, minx, maxx, miny, maxy)); }
private static extern void igraph_vector_scale_x64([In, Out] igraph_vector_t vector, double by);
private static extern int igraph_vector_reverse_x64([In, Out] igraph_vector_t vector);
private static extern void igraph_vector_copy_to_x64(igraph_vector_t from, [In, Out] double[] to);
private static extern double igraph_vector_set_x64([In, Out] igraph_vector_t vector, int index, double value);
internal static double igraph_vector_e(igraph_vector_t vector, int index) { return(X86 ? igraph_vector_e_x86(vector, index) : igraph_vector_e_x64(vector, index)); }
internal static int igraph_vector_copy(igraph_vector_t to, igraph_vector_t from) { return(X86 ? igraph_vector_copy_x86(to, from) : igraph_vector_copy_x64(to, from)); }
internal static int igraph_vector_init_copy(igraph_vector_t vector, double[] vec) { return(X86 ? igraph_vector_init_copy_x86(vector, vec, vec.Length) : igraph_vector_init_copy_x64(vector, vec, vec.Length)); }
internal static int igraph_vector_init(igraph_vector_t vector, int length) { return(X86 ? igraph_vector_init_x86(vector, length) : igraph_vector_init_x64(vector, length)); }
private static extern int igraph_vector_copy_x64([In, Out] igraph_vector_t to, igraph_vector_t from);
internal static int igraph_vector_reverse(igraph_vector_t vector) { return(X86 ? igraph_vector_reverse_x86(vector) : igraph_vector_reverse_x64(vector)); }
private static extern int igraph_vector_fill_x64([In, Out] igraph_vector_t vector, double v);
internal static int igraph_vector_shuffle(igraph_vector_t vector) { return(X86 ? igraph_vector_shuffle_x86(vector) : igraph_vector_shuffle_x64(vector)); }
private static extern int igraph_vector_shuffle_x64([In, Out] igraph_vector_t vector);
private static extern int igraph_vector_init_x64([In, Out] igraph_vector_t vector, int length);
internal static int igraph_layout_fruchterman_reingold(igraph_t graph, igraph_matrix_t res, bool use_seed, int niter, double start_temp, igraph_layout_grid_t grid, igraph_vector_t weights, igraph_vector_t minx, igraph_vector_t maxx, igraph_vector_t miny, igraph_vector_t maxy) { return(X86 ? igraph_layout_fruchterman_reingold_x86(graph, res, use_seed, niter, start_temp, grid, weights, minx, maxx, miny, maxy) : igraph_layout_fruchterman_reingold_x64(graph, res, use_seed, niter, start_temp, grid, weights, minx, maxx, miny, maxy)); }
private static extern int igraph_vector_init_copy_x64([In, Out] igraph_vector_t vector, double[] vec, int length);
private static extern int igraph_layout_fruchterman_reingold_x64(igraph_t graph, [In, Out] igraph_matrix_t res, bool use_seed, int niter, double start_temp, igraph_layout_grid_t grid, igraph_vector_t weights, igraph_vector_t minx, igraph_vector_t maxx, igraph_vector_t miny, igraph_vector_t maxy);
private static extern void igraph_vector_destroy_x64([In, Out] igraph_vector_t vector);
internal static int igraph_pagerank(igraph_t graph, igraph_pagerank_algo_t algo, igraph_vector_t vector, out double value, igraph_vs_t vids, bool directed, double damping, igraph_vector_t weights) { value = 1; var options = IntPtr.Zero; if (algo == igraph_pagerank_algo_t.IGRAPH_PAGERANK_ALGO_ARPACK) { var arpackoptions = GetDefaultArpackOptions(); options = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(igraph_arpack_options_t))); Marshal.StructureToPtr(arpackoptions, options, false); } else if (algo == igraph_pagerank_algo_t.IGRAPH_PAGERANK_ALGO_POWER) { var poweroptions = GetDefaultPowerOptions(); options = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(igraph_pagerank_power_options_t))); Marshal.StructureToPtr(poweroptions, options, false); } try { return(X86 ? igraph_pagerank_x86(graph, algo, vector, ref value, vids, directed, damping, weights, options) : igraph_pagerank_x64(graph, algo, vector, ref value, vids, directed, damping, weights, options)); } finally { if (algo == igraph_pagerank_algo_t.IGRAPH_PAGERANK_ALGO_ARPACK) { Marshal.DestroyStructure(options, typeof(igraph_arpack_options_t)); Marshal.FreeHGlobal(options); } else if (algo == igraph_pagerank_algo_t.IGRAPH_PAGERANK_ALGO_POWER) { Marshal.DestroyStructure(options, typeof(igraph_pagerank_power_options_t)); Marshal.FreeHGlobal(options); } } }
private static extern int igraph_bfs_x64(igraph_t graph, int root, igraph_vector_t roots, igraph_neimode_t mode, bool unreachable, igraph_vector_t restricted, [In, Out] igraph_vector_t order, [In, Out] igraph_vector_t rank, [In, Out] igraph_vector_t father, [In, Out] igraph_vector_t pred, [In, Out] igraph_vector_t succ, [In, Out] igraph_vector_t dist, igraph_bfshandler_t callback, IntPtr extra);