This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <R.h> | |
| #include <Rmath.h> | |
| #include <Rinternals.h> | |
| SEXP BSput (SEXP S, SEXP X, SEXP b, SEXP r, SEXP t, SEXP v) | |
| { | |
| /* possible add vectorization to this to make it faster, though | |
| the R code is plenty fast enough */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef _WIN32 | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <winsock2.h> | |
| #else | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <netdb.h> | |
| #include <unistd.h> | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "encoding/json" | |
| ) | |
| type test_struct struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <math.h> | |
| const double Pi = 3.14159265359; | |
| // Standard Normal probability density function | |
| // Normal PDF(x) = exp(-x*x/2)/{sigma * sqrt(2 * Pi) } | |
| double Normal_PDF(const double & x) { | |
| return (1.0/(double)pow(2 * Pi, 0.5)) * exp(-0.5 * x * x); | |
| } |
NewerOlder