File: options.c

package info (click to toggle)
r-cran-igraph 0.7.1-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 14,280 kB
  • sloc: ansic: 150,105; cpp: 19,404; fortran: 3,777; yacc: 1,164; tcl: 931; lex: 484; makefile: 13; sh: 9
file content (47 lines) | stat: -rw-r--r-- 1,489 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* options.c
 *
 * Copyright (C) 2012 Tamas Nepusz
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or (at
 * your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#include "error.h"
#include "plfit.h"

const plfit_continuous_options_t plfit_continuous_default_options = {
  /* .finite_size_correction = */ 0,
  /* .xmin_method = */ PLFIT_GSS_OR_LINEAR
};

const plfit_discrete_options_t plfit_discrete_default_options = {
  /* .finite_size_correction = */ 0,
  /* .alpha_method = */ PLFIT_LBFGS,
  /* .alpha = */ {
    /* .min = */ 1.01,
    /* .max = */ 5,
    /* .step = */ 0.01
  }
};

int plfit_continuous_options_init(plfit_continuous_options_t* options) {
	*options = plfit_continuous_default_options;
	return PLFIT_SUCCESS;
}

int plfit_discrete_options_init(plfit_discrete_options_t* options) {
	*options = plfit_discrete_default_options;
	return PLFIT_SUCCESS;
}