Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Authors@R: c(
person(family = "Stanford SNAP", role = "ctb", comment = "http://snap.stanford.edu")
)
RoxygenNote: 6.0.1.9000
SystemRequirements: GNU make
3 changes: 2 additions & 1 deletion R/hello.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' Test function
#' @export
test_fun <- function() {
sample(10)
}
}
14 changes: 0 additions & 14 deletions inst/include/RcppSNAP.h

This file was deleted.

1 change: 0 additions & 1 deletion inst/include/Version

This file was deleted.

11 changes: 11 additions & 0 deletions man/test_fun.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 10 additions & 58 deletions src/Makevars
Original file line number Diff line number Diff line change
@@ -1,63 +1,15 @@
PKG_CXXFLAGS = -I../inst/include -I../inst/include/snap-core -I../inst/include/glib-core
SNAPROOT = ../inst/include
PKG_CXXFLAGS = -Isnap/snap-core -Isnap/glib-core
PKG_LIBS=-Lsnap/snap-core -lsnap

#
# Global configuration for SNAP makefiles
#
all: $(SHLIB)

GLIB = glib-core
SNAP = snap-core
GLIBADV = glib-adv
SNAPADV = snap-adv
SNAPEXP = snap-exp
$(SHLIB): $(OBJECTS)

CGLIB = $(SNAPROOT)/$(GLIB)
CSNAP = $(SNAPROOT)/$(SNAP)
$(OBJECTS): snap/snap-core/libsnap.a

EXGLIB = ../../$(GLIB)
EXSNAP = ../../$(SNAP)
EXGLIBADV = ../../$(GLIBADV)
EXSNAPADV = ../../$(SNAPADV)
EXSNAPEXP = ../../$(SNAPEXP)
snap/snap-core/libsnap.a:
$(MAKE) -C snap/snap-core lib CC="$(CC)" CXX="$(CXX)" AR="$(AR)" ARFLAGS=$(ARFLAGS)

UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
# Linux flags
CC = g++
CXXFLAGS += -std=c++98 -Wall
CXXFLAGS += -O3 -DNDEBUG -fopenmp
# turn on for crash debugging, get symbols with <prog> 2>&1 | c++filt
#CXXFLAGS += -g -rdynamic
#CXXFLAGS += -ggdb
# turn on for OpenMP
CXXOPENMP =
LDFLAGS +=
LIBS += -lrt

else ifeq ($(UNAME), Darwin)
# OS X flags
CC = g++
CXXFLAGS += -std=c++98 -Wall -Wno-unknown-pragmas
CXXFLAGS += -O3 -DNDEBUG
CLANG := $(shell g++ -v 2>&1 | grep clang | cut -d " " -f 2)
ifneq ($(CLANG), LLVM)
CXXFLAGS += -fopenmp
#CXXOPENMP += -fopenmp
else
CXXFLAGS += -DNOMP
CXXOPENMP =
endif
LDFLAGS +=
LIBS +=

else ifeq ($(shell uname -o), Cygwin)
# Cygwin flags
CC = g++
CXXFLAGS += -Wall -D__STDC_LIMIT_MACROS
CXXFLAGS += -O3 -DNDEBUG
CXXOPENMP = -fopenmp
LDFLAGS +=
LIBS +=

endif
clean:
$(MAKE) -C snap clean
rm -f $(OBJECTS)
1 change: 0 additions & 1 deletion src/RcppExports.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include "../inst/include/RcppSNAP.h"
#include <Rcpp.h>

using namespace Rcpp;
Expand Down
6 changes: 3 additions & 3 deletions src/rcpp_test.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include <RcppSNAP.h>
#include <Snap.h>

// [[Rcpp::export]]
int DefaultConstructor() {
PNEANet Graph;

Graph = TNEANet::New();
Graph->AddNode(1);
Graph->AddNode(2);
Graph->AddEdge(1, 2, 1);
return Graph->GetNodes();
}
}
61 changes: 61 additions & 0 deletions src/snap/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Mac OS X
.DS_Store

# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/

build/

# Compiler-generated files
*.o
*.dSYM/
*.pyc

# Test-generated files
test_*.dat
test_*.dot
test_*.gif
sample_*.dot
*.graph
*.log
*.m
*.net
*.out
*.paj
*.png
*.plt
*.tab
*.ps
*.pool
*.xml

# Backup files
*~.nib
*.swo
*.swp

# Doxygen-produced files
doxygen/snapdoc-dev
doxygen/snapdoc-user
doxygen/log*.txt
doxygen/snap

# Ignore executables, but keep everything else
snap-core/testSnap
test/run-all-tests
!test/graphviz/base*
tutorials/*
!tutorials/*.*
!tutorials/Makefile
!tutorials/cncom
!tutorials/graphviz
!tutorials/parser
tutorials/.DS_Store
tutorials/*.dSYM
benchmarking/*.dat
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading