[14234] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
| 3 | * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
| 4 | *
|
---|
| 5 | * This file is part of HeuristicLab.
|
---|
| 6 | *
|
---|
| 7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
| 8 | * it under the terms of the GNU General Public License as published by
|
---|
| 9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
| 10 | * (at your option) any later version.
|
---|
| 11 | *
|
---|
| 12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 15 | * GNU General Public License for more details.
|
---|
| 16 | *
|
---|
| 17 | * You should have received a copy of the GNU General Public License
|
---|
| 18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 19 | */
|
---|
| 20 | #endregion
|
---|
| 21 |
|
---|
| 22 | using System;
|
---|
| 23 | using System.Runtime.InteropServices;
|
---|
| 24 |
|
---|
[14244] | 25 | namespace HeuristicLab.IGraph {
|
---|
[14234] | 26 | #region Structs
|
---|
| 27 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
---|
| 28 | internal class igraph_rng_type_t {
|
---|
| 29 | IntPtr name;
|
---|
| 30 | internal uint min;
|
---|
| 31 | internal uint max;
|
---|
| 32 | };
|
---|
| 33 |
|
---|
| 34 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
---|
| 35 | internal class igraph_rng_t {
|
---|
| 36 | IntPtr type;
|
---|
| 37 | IntPtr state;
|
---|
| 38 | internal int def;
|
---|
| 39 | };
|
---|
| 40 |
|
---|
| 41 |
|
---|
| 42 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
---|
| 43 | internal class igraph_vector_t {
|
---|
| 44 | IntPtr stor_begin;
|
---|
| 45 | IntPtr stor_end;
|
---|
| 46 | IntPtr end;
|
---|
| 47 | };
|
---|
| 48 |
|
---|
| 49 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
---|
| 50 | internal class igraph_matrix_t {
|
---|
| 51 | igraph_vector_t data = new igraph_vector_t();
|
---|
| 52 | internal int nrow;
|
---|
| 53 | internal int ncol;
|
---|
| 54 | };
|
---|
| 55 |
|
---|
| 56 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
---|
| 57 | internal class igraph_t {
|
---|
| 58 | internal int n;
|
---|
| 59 | internal bool directed;
|
---|
| 60 | igraph_vector_t from = new igraph_vector_t();
|
---|
| 61 | igraph_vector_t to = new igraph_vector_t();
|
---|
| 62 | igraph_vector_t oi = new igraph_vector_t();
|
---|
| 63 | igraph_vector_t ii = new igraph_vector_t();
|
---|
| 64 | igraph_vector_t os = new igraph_vector_t();
|
---|
| 65 | igraph_vector_t @is = new igraph_vector_t();
|
---|
| 66 | IntPtr attr;
|
---|
| 67 | };
|
---|
[14244] | 68 |
|
---|
| 69 | [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Ansi)]
|
---|
| 70 | internal struct igraph_vs_t {
|
---|
| 71 | [FieldOffset(0)]
|
---|
| 72 | internal int type;
|
---|
| 73 | [FieldOffset(4)]
|
---|
| 74 | int vid;
|
---|
| 75 | [FieldOffset(4)]
|
---|
| 76 | IntPtr vecptr;
|
---|
| 77 | [FieldOffset(4)]
|
---|
| 78 | int adj_vid;
|
---|
| 79 | [FieldOffset(8)]
|
---|
| 80 | igraph_neimode_t adj_mode;
|
---|
| 81 | [FieldOffset(4)]
|
---|
| 82 | int seq_from;
|
---|
| 83 | [FieldOffset(8)]
|
---|
| 84 | int seq_to;
|
---|
| 85 | }
|
---|
| 86 |
|
---|
| 87 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
---|
| 88 | unsafe internal struct igraph_arpack_options_t {
|
---|
| 89 | /* INPUT */
|
---|
| 90 | internal fixed char bmat[1]; /* I-standard problem, G-generalized */
|
---|
| 91 | internal int n; /* Dimension of the eigenproblem */
|
---|
| 92 | internal fixed char which[2]; /* LA, SA, LM, SM, BE */
|
---|
| 93 | internal int nev; /* Number of eigenvalues to be computed */
|
---|
| 94 | internal double tol; /* Stopping criterion */
|
---|
| 95 | internal int ncv; /* Number of columns in V */
|
---|
| 96 | internal int ldv; /* Leading dimension of V */
|
---|
| 97 | internal int ishift; /* 0-reverse comm., 1-exact with tridiagonal */
|
---|
| 98 | internal int mxiter; /* Maximum number of update iterations to take */
|
---|
| 99 | internal int nb; /* Block size on the recurrence, only 1 works */
|
---|
| 100 | internal int mode; /* The kind of problem to be solved (1-5)
|
---|
| 101 | 1: A*x=l*x, A symmetric
|
---|
| 102 | 2: A*x=l*M*x, A symm. M pos. def.
|
---|
| 103 | 3: K*x = l*M*x, K symm., M pos. semidef.
|
---|
| 104 | 4: K*x = l*KG*x, K s. pos. semidef. KG s. indef.
|
---|
| 105 | 5: A*x = l*M*x, A symm., M symm. pos. semidef. */
|
---|
| 106 | internal int start; /* 0: random, 1: use the supplied vector */
|
---|
| 107 | internal int lworkl; /* Size of temporary storage, default is fine */
|
---|
| 108 | internal double sigma; /* The shift for modes 3,4,5 */
|
---|
| 109 | internal double sigmai; /* The imaginary part of shift for rnsolve */
|
---|
| 110 | /* OUTPUT */
|
---|
| 111 | internal int info; /* What happened, see docs */
|
---|
| 112 | internal int ierr; /* What happened in the dseupd call */
|
---|
| 113 | internal int noiter; /* The number of iterations taken */
|
---|
| 114 | internal int nconv;
|
---|
| 115 | internal int numop; /* Number of OP*x operations */
|
---|
| 116 | internal int numopb; /* Number of B*x operations if BMAT='G' */
|
---|
| 117 | internal int numreo; /* Number of steps of re-orthogonalizations */
|
---|
| 118 | /* INTERNAL */
|
---|
| 119 | internal fixed int iparam[11];
|
---|
| 120 | internal fixed int ipntr[14];
|
---|
| 121 | }
|
---|
| 122 |
|
---|
| 123 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
---|
| 124 | internal struct igraph_pagerank_power_options_t {
|
---|
| 125 | internal int niter;
|
---|
| 126 | internal double eps;
|
---|
| 127 | }
|
---|
[14234] | 128 | #endregion
|
---|
| 129 |
|
---|
| 130 | #region Enums
|
---|
| 131 | internal enum igraph_layout_grid_t {
|
---|
| 132 | IGRAPH_LAYOUT_GRID,
|
---|
| 133 | IGRAPH_LAYOUT_NOGRID,
|
---|
| 134 | IGRAPH_LAYOUT_AUTOGRID
|
---|
| 135 | };
|
---|
[14244] | 136 | internal enum igraph_pagerank_algo_t {
|
---|
| 137 | IGRAPH_PAGERANK_ALGO_POWER = 0,
|
---|
| 138 | IGRAPH_PAGERANK_ALGO_ARPACK = 1,
|
---|
| 139 | IGRAPH_PAGERANK_ALGO_PRPACK = 2
|
---|
| 140 | }
|
---|
| 141 | internal enum igraph_neimode_t {
|
---|
| 142 | IGRAPH_OUT = 1,
|
---|
| 143 | IGRAPH_IN = 2,
|
---|
| 144 | IGRAPH_ALL = 3,
|
---|
| 145 | IGRAPH_TOTAL = 3
|
---|
| 146 | }
|
---|
[14234] | 147 | #endregion
|
---|
| 148 | }
|
---|