sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
0fbbe4073f531be173cb8568cc144b68dc80fca9f4b7001a621de2155cc84454 | C | 652 | 42 | /* f77 interface to system routine */
#include "f2c.h"
#ifdef KR_headers
extern char *F77_aloc();
integer
system_(s, n) register char *s; ftnlen n;
#else
#undef abs
#undef min
#undef max
#include "stdlib.h"
#ifdef __cplusplus
extern "C" {
#endif
extern char *F77_aloc(ftnlen, const char*);
integer
system_(register... |
9b9902302ab15dbd4cdb9e94b884a148ebf40aa9c14939928a3769351fae919d | C | 670 | 19 | /*
* filename: usage.c
* Author: Akira Funahashi <funa@bio.keio.ac.jp>
* Last modified: Thu, 25 Jul 2013 02:58:12 +0900
*/
#include "mtsim.h"
void usage(char* myname) {
printf("Usage : %s [option]\n", myname);
printf(" -h : Show this message\n");
printf(" -c : Check output with fixed random seed (0.0)\n"... |
eebd65c089fc520b2e8e7880870c57970e58d5b780f46c71f01fdb5e80996ef7 | C | 678 | 46 | #include "f2c.h"
#ifdef KR_headers
#ifdef IEEE_drem
double drem();
#else
double floor();
#endif
double r_mod(x,y) real *x, *y;
#else
#ifdef IEEE_drem
double drem(double, double);
#else
#undef abs
#include "math.h"
#ifdef __cplusplus
extern "C" {
#endif
#endif
double r_mod(real *x, real *y)
#endif
{
#ifdef IEEE_drem
d... |
6cc313029fdf8144ab9eb31f534357dda531a9ac2d6a787a68f0d445ad88e205 | C | 684 | 44 | #include "f2c.h"
#undef abs
#undef min
#undef max
#include "stdio.h"
static integer memfailure = 3;
#ifdef KR_headers
extern char *malloc();
extern void exit_();
char *
F77_aloc(Len, whence) integer Len; char *whence;
#else
#include "stdlib.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#... |
fa3ac4f332b2c8b6b21d40514812536740bcbd58d7cfe96f3137cbe69a0eee68 | C | 686 | 34 |
const char features[] = {""
"C_FEATURE:"
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
"1"
#else
"0"
#endif
"c_function_prototypes\n"
"C_FEATURE:"
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
"1"
#else
"0"
#endif
"c_restrict\n"
"C_FEATURE:"
#if (__GNUC__ * 1... |
4be4f841140f0b412d51ed4f7e690a29990c125a343133e3501f03aeb8408950 | C | 688 | 46 | #include "f2c.h"
#ifdef KR_headers
#ifdef IEEE_drem
double drem();
#else
double floor();
#endif
double d_mod(x,y) doublereal *x, *y;
#else
#ifdef IEEE_drem
double drem(double, double);
#else
#undef abs
#include "math.h"
#ifdef __cplusplus
extern "C" {
#endif
#endif
double d_mod(doublereal *x, doublereal *y)
#endif
{
#... |
398045f00ab973e1d3fb033e5397c525cc3ec9620f5fb286b3831a1cbf5358c8 | C | 697 | 42 | #include "f2c.h"
#include "fio.h"
#include "fmt.h"
#include "lio.h"
#include "string.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
integer s_wsle(a) cilist *a;
#else
integer s_wsle(cilist *a)
#endif
{
int n;
if(n=c_le(a)) return(n);
f__reading=0;
f__external=1;
f__formatted=1;
f__putn = x_putc;
f_... |
a0b81f641e8885878b6569068485265a45b5ba4bf0d738f9377fd6298c2ef6da | C | 722 | 50 | #include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
/* compare two strings */
#ifdef KR_headers
integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb;
#else
integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb)
#endif
{
register unsigned char *a, *aend, *b, *bend;
a = (unsigned char *)a0;
b = (unsigned cha... |
eb7cdbad9002ecff12064391f4673bb1788252cec81920756101d1c3f231d40d | C | 743 | 52 | #include "stdio.h"
#include "signal.h"
#include "igraph_error.h"
#ifndef SIGIOT
#ifdef SIGABRT
#define SIGIOT SIGABRT
#endif
#endif
#ifdef KR_headers
void sig_die(s, kill) char *s; int kill;
#else
#include "stdlib.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void f_exit(vo... |
b8275706ba050a2be56d1da7e4f3d0a5e6c62d223c2b87272c64401677390359 | C | 755 | 26 | #include "cs.h"
/* load a triplet matrix from a file */
cs *cs_load (FILE *f)
{
double i, j ; /* use double for integers to avoid csi conflicts */
double x ;
#ifdef CS_COMPLEX
double xi ;
#endif
cs *T ;
if (!f) return (NULL) ; /* check inputs */
T = cs_spalloc (0, 0... |
4f0618b11405a45c77e5c1ac0b71a8357176d648b38d39219d8fcb1aaf601dbf | C | 759 | 32 | #include "stdio.h"
#include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
/* called when a subscript is out of range */
#ifdef KR_headers
extern VOID sig_die();
integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
#else
extern VOID sig_die(const char*,int);
integer s_rnge(char *varn, ft... |
f7896d2b0756977e8370d4ca00ad1d17e50081611a871e6f14983cbec57571fe | C | 762 | 24 | /* Checks whether the endianness of IEEE754 doubles matches the endianness of
* uint64_t on the target system. This is needed to ensure that the trick we
* employ in igraph_rng_get_unif01() works. */
#include <stdint.h>
#include <stdio.h>
union {
uint64_t as_uint64_t;
double as_double;
} value;
int main(vo... |
51c0765256c067e0b62b7a32ea45de3617fb73339233ebc9545572a967edd46b | C | 768 | 30 |
#include <igraph.h>
int main(void) {
igraph_t graph;
igraph_bool_t res;
igraph_vector_int_t v;
igraph_vector_int_init_int(&v, 3, 3, 4, 5);
/* Initialize the library. */
igraph_setup();
/* Create a directed symmetric tree with 2 levels -
3 children in first and 4 children in secon... |
17f686ce4667f97a3c0dac136d630319adcb68b3d44224c531cbdd3dea74b3e1 | C | 775 | 25 |
#include <igraph.h>
int main(void) {
igraph_t graph;
igraph_real_t result;
/* Initialize the library. */
igraph_setup();
/* Create a random preferential attachment graph. */
igraph_barabasi_game(&graph, 30, /*power=*/ 1, 30, NULL, /*outpref=*/ false, /*A=*/ 1,
IGRAPH... |
d44ad8b0bd50ab0eb2404458a473fc5435d633f698af8e1373ebb640b4e51b09 | C | 809 | 20 | /*
* filename: usage.c
* Author: Akira Funahashi <funa@bio.keio.ac.jp>
* Last modified: Thu, 25 Jul 2013 02:58:12 +0900
*/
#include "mtsim.h"
void usage(char* myname) {
printf("Usage : %s [option]\n", myname);
printf(" -h : Show this message\n");
printf(" -c : Check output with fixed random seed (0.0)\n"... |
0600ed474be0b643cd1bace6b62eb5a9c9e81080965e1bdbf854aa81edbe7eda | C | 816 | 51 | /* Link in this file for random number generation with rand() */
#include <stdio.h>
#include <stdlib.h>
double
ran1()
{
int rand();
return( rand()/(RAND_MAX+1.0) );
}
void seedit( const char *flag)
{
FILE *fopen(), *pfseed;
unsigned int seed2 ;
if( flag[0] == 's' ) {
pfseed = fopen("seedms","r");
... |
c801d490a61529b3e92b944fbe86e28ab923a7284b50df7320cc35f067447d76 | C | 828 | 47 | /* sequential formatted external common routines*/
#include "f2c.h"
#include "fio.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
extern char *f__fmtbuf;
#else
extern const char *f__fmtbuf;
#endif
integer e_rsfe(Void)
{ int n;
n=en_fio();
f__fmtbuf=NULL;
return(n);
}
int
#ifdef KR_headers
c_sfe(a) ci... |
c443c62a4c91ae7e9cfd643a194bc5fafcc371e24c21a066525226de10bd6305 | C | 837 | 47 | /* Link in this file for random number generation with rand()
and seeding from the clock */
/* Thanks to Alan Rogers for suggestion of using pid. 17 Nov 2018 */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
double
ran1()
{
int rand();
return( rand()/(RAND_MAX+1.0) );
}
... |
16580125cbf291b905cc439d1d208fe08927b5d431f369f7473581b1aa5332c3 | C | 839 | 57 | #include "time.h"
#ifdef MSDOS
#undef USE_CLOCK
#define USE_CLOCK
#endif
#ifndef REAL
#define REAL double
#endif
#ifndef USE_CLOCK
#define _INCLUDE_POSIX_SOURCE /* for HP-UX */
#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
#include "sys/types.h"
#include "sys/times.h"
#ifdef __cplusplus
extern "C" {
#endif
#endif
#... |
7bcf2664512077fcee7876d399e27bea52b826cf5fbaf4c5d9fa88066cfccfdb | C | 839 | 30 |
#include <igraph.h>
int main(void) {
igraph_t tree;
igraph_vector_t eccentricity;
igraph_bool_t is_tree;
/* Initialize the library. */
igraph_setup();
/* Create a Bethe lattice with 5 levels, i.e. height 4. */
igraph_regular_tree(&tree, 4, 3, IGRAPH_TREE_UNDIRECTED);
/* Bethe lattic... |
1a9922e8756301864e754a8fae25b08621b7ee4612c6036540abdc7046afaeb1 | C | 851 | 52 | #include "stdio.h"
#include "f2c.h"
#include "igraph_error.h"
#ifdef KR_headers
extern void f_exit();
int s_stop(s, n) char *s; ftnlen n;
#else
#undef abs
#undef min
#undef max
#include "stdlib.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
void f_exit(void);
int s_stop(char *s, ftnl... |
ff06dabb787d04459b19cbbe4708d2e602cf51c322358a455bd26fdf2b9837ff | C | 851 | 60 | #include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
VOID pow_zi(p, a, b) /* p = a**b */
doublecomplex *p, *a; integer *b;
#else
extern void z_div(doublecomplex*, doublecomplex*, doublecomplex*);
void pow_zi(doublecomplex *p, doublecomplex *a, integer *b) /* p = a**b */
#endif
{
integer n;
... |
47f010feadccba7cfda2d54ae274dd41a1d5cc5bfb663fe7820b839e08a9d605 | C | 858 | 33 |
#include <igraph.h>
#include <assert.h>
int main(void) {
igraph_t graph;
igraph_vector_int_t edges;
/* Initialize the library. */
igraph_setup();
/* Create a directed graph with no vertices or edges. */
igraph_empty(&graph, 0, IGRAPH_DIRECTED);
/* Add 5 vertices. Vertex IDs will range f... |
2daff0d9b320d13f2c74719a8b7f2fda3adf211d7a1cbc8bc7188fe28c24003f | C | 865 | 51 | /* @(#)fmtlib.c 1.2 */
#define MAXINTLENGTH 23
#include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Allow_TYQUAD
#undef longint
#define longint long
#undef ulongint
#define ulongint unsigned long
#endif
#ifdef KR_headers
char *f__icvt(value,ndigit,sign, base) longint value; int *ndigit,*sign;
register int... |
4cf2cdffc42b7905a082e0f38b35099f1ff6901a14ef3b79d160bcf61e7987da | C | 876 | 23 | /**
* <!--------------------------------------------------------------------------
* This file is part of libSBMLSim. Please visit
* http://fun.bio.keio.ac.jp/software/libsbmlsim/ for more
* information about libSBMLSim and its latest version.
*
* Copyright (C) 2011-2013 by the Keio University, Yokohama, Japan
... |
2f225ce58d060c2bc3bbcd51f73c2a423cf19dc7c70642836cf20711fbb71df1 | C | 899 | 36 | /* -- translated by f2c (version 20240504).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of the com... |
452e28c3d79042878c1b167f4be9176aea7045ac30ad0771057a19de2e0ba9e1 | C | 900 | 37 |
#include <igraph.h>
int main(void) {
igraph_t g1, g2;
igraph_bool_t iso;
/* Initialize the library. */
igraph_setup();
/* Seed the default random number generator and create a random graph. */
igraph_rng_seed(igraph_rng_default(), 1122);
igraph_erdos_renyi_game_gnp(&g1, 100, 3.0 / 100, ... |
833106815beecf8814a472df9b14fdb0fce8bd3a7427da81bfe25880d6e7c642 | C | 900 | 52 | #include "f2c.h"
#include "fio.h"
#ifdef __cplusplus
extern "C" {
#endif
static FILE *
#ifdef KR_headers
unit_chk(Unit, who) integer Unit; char *who;
#else
unit_chk(integer Unit, const char *who)
#endif
{
if (Unit >= MXUNIT || Unit < 0)
f__fatal(101, who);
return f__units[Unit].ufd;
}
integer
#ifdef KR_headers... |
a228fffbd0bc55ba903de518ae335a253546ad1c48677cb9364f6575d78b6226 | C | 913 | 50 | #include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
extern VOID sig_die();
VOID z_div(c, a, b) doublecomplex *a, *b, *c;
#else
extern void sig_die(const char*, int);
void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b)
#endif
{
double ratio, den;
double abr, abi, cr;
if( (abr = b-... |
5fe2ab885858cf332136426ecf839c5ad852decb66548d26adc6decdae85d286 | C | 916 | 33 | #include <igraph.h>
int main(void) {
igraph_int_t num_vertices = 1000;
igraph_int_t num_edges = 1000;
igraph_real_t diameter, mean_degree;
igraph_t graph;
/* Initialize the library. */
igraph_setup();
/* Ensure identical results across runs. */
igraph_rng_seed(igraph_rng_default(), 42... |
3282195f6ac54cafbbe637698af4a699c420faba9e5a713cf9660c4c01cae9f9 | C | 920 | 27 | /*
igraph library.
Copyright (C) 2021 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
8761baefabb14569f15943e5313695b0c595d26ee996c7f9df56a003b0dc9c0c | C | 940 | 37 | #include <Infomap.h>
#include <stdio.h>
int main(int argc, char** argv)
{
struct Infomap* im = NewInfomap("--two-level");
InfomapAddLink(im, 0, 2, 1.0);
InfomapAddLink(im, 0, 3, 1.0);
InfomapAddLink(im, 1, 0, 1.0);
InfomapAddLink(im, 1, 2, 1.0);
InfomapAddLink(im, 2, 1, 1.0);
InfomapAddLin... |
2cf396ee84409dbea8bef0ecca3acc46cf1042649bf4dc0cfa52a76cb5ba496f | C | 952 | 53 | #include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
extern VOID sig_die();
VOID c_div(c, a, b)
f2c_complex *a, *b, *c;
#else
extern void sig_die(const char*,int);
void c_div(f2c_complex *c, f2c_complex *a, f2c_complex *b)
#endif
{
double ratio, den;
double abr, abi, cr;
if( (abr = b->r) < 0.)... |
99b477f8d677dcb22e356e7a3cf923677c2d4e2d092e57419f9f02218e2b2411 | C | 962 | 31 | #include <igraph.h>
int main(void) {
igraph_t graph;
igraph_attribute_combination_t comb;
/* Initialize the library. */
igraph_setup();
igraph_set_attribute_table(&igraph_cattribute_table);
igraph_small(&graph, 2, IGRAPH_DIRECTED,
0,1, 0,1,
-1);
SETEAB(... |
7834e45ccf693487ea2a4875877c40fb218f46a0351f8dd5e762fa98306a2ce8 | C | 972 | 57 | #include "sysdep1.h" /* here to get stat64 on some badly designed Linux systems */
#include "f2c.h"
#include "fio.h"
#ifdef __cplusplus
extern "C" {
#endif
VOID
#ifdef KR_headers
#define Const /*nothing*/
g_char(a,alen,b) char *a,*b; ftnlen alen;
#else
#define Const const
g_char(const char *a, ftnlen alen, char *b)
#... |
e0ef40b6f8d4e62b79d8a5238e6e28a0bf304ec7981d2418975b409d3388dea8 | C | 972 | 63 | #include "time.h"
#ifdef MSDOS
#undef USE_CLOCK
#define USE_CLOCK
#endif
#ifndef REAL
#define REAL double
#endif
#ifndef USE_CLOCK
#define _INCLUDE_POSIX_SOURCE /* for HP-UX */
#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */
#include "sys/types.h"
#include "sys/times.h"
#ifdef __cplusplus
extern "C" {
#endif
#endif
#... |
fa23108d794491ac5c70e1bcb6afaf356e5bc94bb78e34107bfbf79e2fa3d0ef | C | 979 | 30 | /*
igraph library.
Copyright (C) 2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
b2b7a5854c6da703d31e348a1b9e3e2c42c27170f3171de96ccc4d4f6c59131b | C | 986 | 26 | #include "cs.h"
#include "igraph_random.h"
/* return a random permutation vector, the identity perm, or p = n-1:-1:0.
* seed = -1 means p = n-1:-1:0. seed = 0 means p = identity. otherwise
* p = random permutation. */
CS_INT *cs_randperm (CS_INT n, CS_INT seed)
{
CS_INT *p, k, j, t ;
if (seed == 0) retur... |
267e84af0f71c62a5ec098beb0e5b272dcdc898221f1a67f2d6bce442ee3ed4e | C | 998 | 43 |
#include <igraph.h>
#include "test_utilities.h"
int main(void) {
igraph_t ug;
igraph_t dg;
igraph_small(&ug, 6, /* directed= */ 0,
2,0, 1,4, 3,2, 2,3, 0,4, 5,0, 2,3, 5,3, 2,5, 0,1,
-1);
igraph_copy(&dg, &ug);
printf("\nARBITRARY:\n");
igraph_to_directed(&dg... |
61ba2f565dc808f3ff255524629a67cde6dde8fbff828b18a89f6a56e4207859 | C | 1,005 | 30 | /* igraph library.
Copyright (C) 2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your opti... |
9fe8ada31e8841e827ea367a3e454a4274d544a4f47a33577fbe3e25bb72a2bb | C | 1,015 | 39 |
#include <igraph.h>
#include <float.h>
int main(void) {
igraph_t graph;
igraph_vector_t pagerank;
igraph_real_t value;
/* Initialize the library. */
igraph_setup();
/* Create a directed graph */
igraph_kautz(&graph, 2, 3);
/* Initialize the vector where the results will be stored */... |
0c48ac007c05ead9141611c05685daf8c86eaa939121b100f9df2e5f5f085def | C | 1,020 | 42 |
#include <igraph.h>
#include "test_utilities.h"
int main(void) {
igraph_t graph;
igraph_vector_int_t counts;
igraph_int_t count;
igraph_vector_int_init(&counts, 0);
/* undirected case */
igraph_small(&graph, 2, IGRAPH_UNDIRECTED,
0,1, 0,1, 0,1, 0,0, 1,1, 1,1,
... |
f794f4457d957759cd5bec51e7f69a6c481c39e2fc22d8e2880f57d0be4e769f | C | 1,026 | 27 | /*
* filename: usage.c
* Author: Akira Funahashi <funa@bio.keio.ac.jp>
* Last modified: Thu, 25 Jul 2013 02:58:12 +0900
*/
#include "mtsim.h"
void usage(char* myname) {
printf("Usage : %s [option]\n", myname);
printf(" -h : Show this message\n");
printf(" -c : Check output with fixed random seed (0.0)\n"... |
9bd1df3dc1e4e07b572166fd51b1c5b2d88082a90c3d82e7b6d5048bf1e87368 | C | 1,030 | 59 | /* Unless compiled with -DNO_OVERWRITE, this variant of s_copy allows the
* target of an assignment to appear on its right-hand side (contrary
* to the Fortran 77 Standard, but in accordance with Fortran 90),
* as in a(2:5) = a(4:7) .
*/
#include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
/* assign strings: ... |
8fc3a12cdb9dda2635c33313b1dde571f47813ebccd8c2055ae4359b6c8bd4b4 | C | 1,045 | 39 | /* -- translated by f2c (version 20240504).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of the com... |
e62d82ae4520112601bbc4f7b8a6c2f1e989c1a73b890dcbf9f3658c873efe2b | C | 1,054 | 32 | /* igraph library.
Copyright (C) 2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your opti... |
661e4534c4ef1e8b6d5a0a327ce75bc6fb5bccd90c4b7edf5d93df1e09ecdc7a | C | 1,067 | 51 | /* Link in this file for random number generation using drand48() */
/* Thanks to Alan Rogers for suggestion of using pid. 17 Nov 2018 */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
double
ran1()
{
double drand48();
return( drand48() );
}
... |
3e79a89e42ea07484514fd262e1e35098981c090555ba8c22319d13f9c9e6d21 | C | 1,097 | 68 | #include "f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef LONGBITS
#define LONGBITS 32
#endif
integer
#ifdef KR_headers
lbit_bits(a, b, len) integer a, b, len;
#else
lbit_bits(integer a, integer b, integer len)
#endif
{
/* Assume 2's complement arithmetic */
unsigned long x, y;
x = (unsigned long) a;
y =... |
fe700fcde659f162093909a6b4f281c4049c7d57bcaeb9c32b1ca3461bbac65a | C | 1,115 | 39 | /*
igraph library.
Copyright (C) 2021 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
4a477b99a8e1ec7337cd4c56bcb2bc476c2e42660005559ec9988ad13796bc13 | C | 1,116 | 36 | /*
igraph library.
Copyright (C) 2024 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
999e6387a9352515246ef532217140d6dc6142a12eab132a8076d8ddb3d211bf | C | 1,125 | 83 | #include "f2c.h"
#include "fio.h"
#include "lio.h"
#ifdef __cplusplus
extern "C" {
#endif
extern char *f__icptr;
extern char *f__icend;
extern icilist *f__svic;
extern int f__icnum;
#ifdef KR_headers
extern void z_putc();
#else
extern void z_putc(int);
#endif
static int
z_wSL(Void)
{
while(f__recpos < f__svic->icirl... |
5373307abd911c010217a34ac2650e404704237f3acd0e170ce037ca80666d59 | C | 1,126 | 37 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 vers... |
13d75cb223aed2a355ec48d130e660df3ac18cb2edc86b3c833f0d849b8ca6c2 | C | 1,136 | 49 | /*
* filename: ran1.c
* this is "minimum" random number generator of Park and Miller with
* Bays-Durham Shuffle and added safeguards
* (Press et al. (1992) Numerical Recipes in C, 2nd Ed. (Cambridge, UK: Cambridge University Press))
* Author: Akatsuki Kimura <akkimura@nig.ac.jp>
* Akira Funahashi <funa@bi... |
8ef741a4a96ccc344f85cc7e81d3846acf986aa5fc7eced587897a7b8605afa4 | C | 1,169 | 45 |
#include <igraph.h>
int main(void) {
igraph_matrix_t m;
igraph_vector_t x, y, z;
igraph_real_t xz, xx;
/* Initialize the library. */
igraph_setup();
igraph_vector_init_real(&x, 3, 1.0, 2.0, 3.0);
igraph_vector_init_real(&y, 4, 4.0, 5.0, 6.0, 7.0);
igraph_vector_init_real(&z, 3, -1.0,... |
ba70d2d605d3edfcce5ab360159aebfc6c32f7238709b8a0cb75071318e09068 | C | 1,174 | 77 | #include "f2c.h"
#include "fio.h"
#include "lio.h"
#include "fmt.h"
extern int f__Aquote;
static VOID
nl_donewrec(Void)
{
(*f__donewrec)();
PUT(' ');
}
#ifdef KR_headers
x_wsne(a) cilist *a;
#else
#include "string.h"
#ifdef __cplusplus
extern "C" {
#endif
VOID
x_wsne(cilist *a)
#endif
{
Namelist *nl;
char *s... |
6a2d346487502d2b79eb5fb12c33134b0f79723646f6932f2fbc78c7a0a74864 | C | 1,197 | 42 | /*
igraph library.
Copyright (C) 2020-2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at y... |
d171e9c9a3aba4152a67359fa693c7dd4564bb6a4b0058d785ce880c637556e9 | C | 1,197 | 38 | /*
igraph library.
Copyright (C) 2020 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
3cd6c175b98af9f0d17b191021385e122d50177fa92f06263a7e7b9d8d015f08 | C | 1,203 | 45 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 vers... |
31198b2773e5e73294620963c7885fd7903fd40791ca9a7216c23532aaabd6d2 | C | 1,209 | 42 |
#include <igraph.h>
#include <stdio.h>
#include "test_utilities.h"
int main(void) {
igraph_t graph;
igraph_int_t prufer1[] = {2, 3, 2, 3};
igraph_int_t prufer2[] = {0, 2, 4, 1, 1, 0};
igraph_vector_int_t prufer;
igraph_bool_t tree;
prufer = igraph_vector_int_view(prufer1, sizeof(prufer1) / ... |
3ad4a0c7efb3bef850ffaac16241c3818a0dd1650b5e278f7ab4f1f028dd3549 | C | 1,212 | 69 |
#include "vector.h"
#include <stdlib.h>
#include <math.h>
#include <assert.h>
//initialization, alloc, free, etc
vector *vectorNew(int startingSize){
vector *new;
new = malloc(sizeof(vector));
new->dubs = malloc(startingSize * sizeof(double));
new->size = startingSize;
vectorInit(new);
return(new);
}
vector... |
23dbba37f81cc6a235b7cc2347c66168a5c7f905e51819e777266e805aa2e7c7 | C | 1,222 | 56 | /* Link in this file for random number generation using drand48() */
#include <stdio.h>
#include <stdlib.h>
double
ran1()
{
double drand48();
return( drand48() );
}
void seedit( char *flag )
{
FILE *fopen(), *pfseed;
unsigned short seedv[3], seedv2[3], *seed48(), *pseed ... |
f24f6251c17352238e9f49227eef7541093e57f93dd35211012d814bec4b4c95 | C | 1,223 | 62 | #include "f2c.h"
#undef abs
#ifdef KR_headers
extern char *F77_aloc(), *getenv();
#else
#include <stdlib.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
extern char *F77_aloc(ftnlen, const char*);
#endif
/*
* getenv - f77 subroutine to return environment variables
*
* called by:
* call getenv (ENV_NA... |
442626eb4b1a7f1b6eae9c2b6ec7474f26bf71206e8b180f7fb6e579fad8e807 | C | 1,225 | 38 | /*
igraph library.
Copyright (C) 2019-2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at y... |
70bd8a05a74e97340341cd45cef7b36b046b74f8c2d47564df6c18d7daf6bbfa | C | 1,225 | 57 | /* Link in this file for random number generation using drand48() */
#include <stdio.h>
#include <stdlib.h>
double
ran1()
{
double drand48();
return( drand48() );
}
void seedit( char *flag )
{
FILE *fopen(), *pfseed;
unsigned short seedv[3], seedv2[3], *seed48(), *pseed ... |
0b15f2be4bff55812cd94e28306db55ba8dd25605d644b1fbe4c5f7a915d9caa | C | 1,232 | 42 | /*
igraph library.
Copyright (C) 2007-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 vers... |
b2efd6b7f5acca43620048746847ef82dcc41be39fe1f28787ab9727fb3da502 | C | 1,235 | 40 | /* igraph library.
Copyright (C) 2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your opti... |
df7a8046948e15e85ef2dc64fc9d657d14985412bb843e0bfe2253d5cdccdfe8 | C | 1,245 | 42 | /*
igraph library.
Copyright (C) 2006-2021 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at y... |
39b828bf9d6ee1ab227e96c44b60a6df2928b670e76e1bb36d708f55c0c119e1 | C | 1,253 | 42 | /*
igraph library.
Copyright (C) 2010-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 vers... |
80f0b7ee1fbe04eeffe4dc195a6fac818d8f82c17128183c7e0e822e7d859560 | C | 1,262 | 41 | /*
igraph library.
Copyright (C) 2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
8261c5856cd92524990953ee4c6742e9bc01e31abbe87daa662fb7ad94bceaf6 | C | 1,265 | 42 | /*
igraph library.
Copyright (C) 2021 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
22385b6cbe5c734b4a96e6f8dfeb1edae756e673ed379bc0909fa09f38a32b05 | C | 1,267 | 37 | #include <igraph.h>
#include <stdio.h>
int main(void){
igraph_t g;
igraph_int_t vcount = 1000;
igraph_real_t pf = 0.2;
/* Initialize the library. */
igraph_setup();
/* Seed random number generator to ensure reproducibility. */
igraph_rng_seed(igraph_rng_default(), 42);
printf("Forest... |
5be012fb085727b0223128df5a1cf2ce7793062e21bef2e0e22ed089519fffdb | C | 1,277 | 45 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 ... |
4e19431c734cf1bd637a9b933727bc3a84215f9463a65ff9f895db97a7ecdea2 | C | 1,280 | 78 | /*write sequential formatted external*/
#include "f2c.h"
#include "fio.h"
#include "fmt.h"
#ifdef __cplusplus
extern "C" {
#endif
int
x_wSL(Void)
{
int n = f__putbuf('\n');
f__hiwater = f__recpos = f__cursor = 0;
return(n == 0);
}
static int
xw_end(Void)
{
int n;
if(f__nonl) {
f__putbuf(n = 0);
fflush(f__... |
b4c0b12e25e6c771c49f7847871c701008d9100c8ff081dedd9ae32576330393 | C | 1,284 | 41 | /*
igraph library.
Copyright (C) 2021 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
6c54f63e1b008f8fc5cbdf17a59f7c221793286d2918d6676a068c097f6ddce2 | C | 1,285 | 41 | /*
igraph library.
Copyright (C) 2006-2024 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at y... |
9d5a5b0d3677bb9b05db7c94fa1b63927873592cdba02aeceeb465e0b94dd141 | C | 1,290 | 52 | /*
igraph library.
Copyright (C) 2011-12 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge MA, 02139 USA
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 ve... |
8c993057f8b875ad471270dd8be46664b428cfef94ecd5e2ab5581112c61a3c5 | C | 1,291 | 39 | /*
igraph library.
Copyright (C) 2021-2022 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at y... |
fa4eac240e7abc2d41ac165db87b17515c9238b81c362819104f91d12e513dbe | C | 1,300 | 47 | /*
igraph library.
Copyright (C) 2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 versi... |
7683ca126ab0986d231704215862ecb4bc0b91a016d19659b399626bb51c4059 | C | 1,311 | 44 | /*
igraph library.
Copyright (C) 2024 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
e1d5fcce829cb956bd2692f67d1d675473b19b8c8d911be4a33ce547d7a8a834 | C | 1,316 | 47 | /*
igraph library.
Copyright (C) 2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, USA 02139
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 2... |
9f811addb58e4da1ad5d4c6a6f7f40201e81a00b2297722d8a1fd825874d7496 | C | 1,326 | 47 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 ... |
4175d80d3db91d44f83f18ce192da6c458baf1d7c5f6e9bb593f385c644b41d4 | C | 1,328 | 76 | #include "f2c.h"
#include "fio.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
integer f_back(a) alist *a;
#else
integer f_back(alist *a)
#endif
{ unit *b;
OFF_T v, w, x, y, z;
uiolen n;
FILE *f;
f__curunit = b = &f__units[a->aunit]; /* curunit for error messages */
if(a->aunit >= MXUNIT || a->aunit <... |
582c30ef474ba3c99a7af2c337a2c5083433404d66d34484d8a8cb75b54eb1b4 | C | 1,333 | 44 | /*
igraph library.
Copyright (C) 2024 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
3a94fc2cae8cb9110482f3d178cdc2f422e9dc8ab5ad257d3e88d880a30c33f5 | C | 1,347 | 46 | /*
igraph library.
Copyright (C) 2022 The igraph development team
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 2 of the License, or
(at your option) any later vers... |
230ff78c25b322c391fdc70c12554ee65cc18dd0942298e6cb18e5827dd751f3 | C | 1,357 | 48 | /*
igraph library.
Copyright (C) 2007-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 ... |
5e4e3ab2df15d0242224638362ae7f4737d15e20d7cf68e2d8fcbaccb4ff3e14 | C | 1,357 | 45 | /*
igraph library.
Copyright (C) 2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 2... |
5edebd8c904d5debda6fafd97e18606983ac2b1ab3d2a44f0e47cad763512f03 | C | 1,361 | 49 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 vers... |
fe9458c18d077e584a91c5893c91af1b96c4f2cd94b092cf4b2116dfa3728da3 | C | 1,362 | 48 | /*
igraph library.
Copyright (C) 2007-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 ... |
546367fbaca15014378f86326c6bb483532794f818d4fb041c63db0f950894f6 | C | 1,370 | 45 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 vers... |
ef73d7493116774502a4b210c8e7e8c2c15a076502c6702e1163bec289c26c40 | C | 1,372 | 49 | /*
igraph library.
Copyright (C) 2021 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
9a248d9025ddf8359f292e1d0c6f0b4822eb2a45ea745b13a0551e83ef3af4b5 | C | 1,377 | 50 | #include <igraph.h>
int main(void) {
igraph_t graph;
igraph_strvector_t names;
igraph_vector_t weights;
igraph_int_t i;
igraph_int_t vcount, ecount;
/* Initialize the library. */
igraph_setup();
igraph_set_attribute_table(&igraph_cattribute_table);
igraph_small(&graph, 7, IGRAPH... |
13d27db5e941415452aae95148e02cb00ecdecb3a3a8a23576e8aa3e309fdd45 | C | 1,378 | 49 | /*
igraph library.
Copyright (C) 2021 The igraph development team <igraph@igraph.org>
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 2 of the License, or
(at your o... |
d7802a0016172330c24572da3942c963ec4fdf10a8a748e110a99f02a34a0357 | C | 1,392 | 43 | /*
igraph library.
Copyright (C) 2010-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 ... |
9034e46b1200354dd22c00ff3d09b083896dd663b30f6d9653aaa584a42cae8c | C | 1,393 | 101 | #include "f2c.h"
#include "fio.h"
#ifdef KR_headers
integer f_clos(a) cllist *a;
#else
#undef abs
#undef min
#undef max
#include "stdlib.h"
#ifdef NON_UNIX_STDIO
#ifndef unlink
#define unlink remove
#endif
#else
#ifdef MSDOS
#include "io.h"
#else
#ifdef __cplusplus
extern "C" int unlink(const char*);
#else
extern int u... |
cb5ed693cf10875da44c1176b4c512f70508a5fb813eb6a45691fe5f5900233c | C | 1,397 | 46 | /*
igraph library.
Copyright (C) 2022 The igraph development team
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 2 of the License, or
(at your option) any later ver... |
b88752581480e0083fbf484da0baf0c9b6352ce74464b36f60335acae0861960 | C | 1,403 | 38 | /* ========================================================================= */
/* === AMD_defaults ======================================================== */
/* ========================================================================= */
/* ------------------------------------------------------------------------- */... |
0c1d3930f8902f6ddd2d9c61a0d389941a46e4a4bc532d72c5d04cf9619512f0 | C | 1,409 | 45 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard st, Cambridge MA, 02139 USA
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 vers... |
ab3048bc7e1385458ed244a23eb6ff80f8b5e22bb5c9f4a644ef16b7d8ceaf54 | C | 1,415 | 47 | /*
igraph library.
Copyright (C) 2013 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 versi... |
2c634cfc187455f75bc758f674d2cc99f99efa6ffb0abbb2f682bd92feb4d65a | C | 1,416 | 50 | /*
igraph library.
Copyright (C) 2006-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 ... |
7877f46a1c40fb94b80aaffe010c77a85210ceafe9c6aa9d8f3d3ced054949ab | C | 1,424 | 53 | /*
igraph library.
Copyright (C) 2007-2012 Gabor Csardi <csardi.gabor@gmail.com>
334 Harvard street, Cambridge, MA 02139 USA
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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.