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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
/*
######################################################################
#
# networkapi.h
#
# Written by Carter T. Butts <buttsc@uci.edu>
# Last Modified 5/07/16
# Licensed under the GNU General Public License version 2 (June, 1991)
# or greater.
#
# Provides support for the R/network package API.
#
# This file was written for network version 1.14. If using a later
# version of network, you may need to update it.
#
# This file contains headers for networkapi.c, as well as macros and
# other definitions needed to support the network package API.
#
######################################################################
*/
#ifndef NETWORKAPI_H
#define NETWORKAPI_H
/*INCLUSIONS----------------------------------------------------------------*/
#include <R.h>
#include <Rdefines.h>
#include <Rinternals.h>
#include <R_ext/Rdynload.h>
/*FUNCTION MACROS-----------------------------------------------------------*/
/*Access functions*/
#define netGetEdgeAttrib (*netGetEdgeAttrib_ptr)
#define netGetEdgeIDs (*netGetEdgeIDs_ptr)
#define netGetEdges (*netGetEdges_ptr)
#define netGetNeighborhood (*netGetNeighborhood_ptr)
#define netGetNetAttrib (*netGetNetAttrib_ptr)
#define netHasLoops (*netHasLoops_ptr)
#define netIsAdj (*netIsAdj_ptr)
#define netIsDir (*netIsDir_ptr)
#define netIsHyper (*netIsHyper_ptr)
#define netIsLoop (*netIsLoop_ptr)
#define netIsMulti (*netIsMulti_ptr)
#define netIsNetwork (*netIsNetwork_ptr)
#define netNetEdgecount (*netNetEdgecount_ptr)
#define netNetSize (*netNetSize_ptr)
/*Modification functions*/
#define netAddEdge (*netAddEdge_ptr)
#define netAddEdges (*netAddEdges_ptr)
#define netDelEdgeAttrib (*netDelEdgeAttrib_ptr)
#define netDelNetAttrib (*netDelNetAttrib_ptr)
#define netDelVertexAttrib (*netDelVertexAttrib_ptr)
#define netSetNetAttrib (*netSetNetAttrib_ptr)
#define netSetVertexAttrib (*netSetVertexAttrib_ptr)
/*POINTER VARIABLES---------------------------------------------------------*/
/*Access functions*/
SEXP (*netGetEdgeAttrib_ptr)(SEXP, int, const char*);
SEXP (*netGetEdgeIDs_ptr)(SEXP, int, int, const char*, int);
SEXP (*netGetEdges_ptr)(SEXP, int, int, const char*, int);
SEXP (*netGetNeighborhood_ptr)(SEXP, int, const char*, int);
SEXP (*netGetNetAttrib_ptr)(SEXP, const char*);
int (*netHasLoops_ptr)(SEXP);
int (*netIsAdj_ptr)(SEXP, int, int, int);
int (*netIsDir_ptr)(SEXP);
int (*netIsHyper_ptr)(SEXP);
int (*netIsLoop_ptr)(SEXP, SEXP);
int (*netIsMulti_ptr)(SEXP);
int (*netIsNetwork_ptr)(SEXP);
int (*netNetEdgecount_ptr)(SEXP, int);
int (*netNetSize_ptr)(SEXP);
/*Modification functions*/
SEXP (*netAddEdge_ptr)(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
SEXP (*netAddEdges_ptr)(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
SEXP (*netDelEdgeAttrib_ptr)(SEXP, int, const char*);
SEXP (*netDelNetAttrib_ptr)(SEXP, const char*);
SEXP (*netDelVertexAttrib_ptr)(SEXP, int, const char*);
SEXP (*netSetNetAttrib_ptr)(SEXP, const char*, SEXP);
SEXP (*netSetVertexAttrib_ptr)(SEXP, const char*, SEXP, int);
/*REGISTRATION FUNCTIONS----------------------------------------------------*/
void netRegisterFunctions(void);
#endif
|