This file contains 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 <iostream> | |
#include <iomanip> | |
#include <fstream> | |
#include "mkl.h" | |
#include "math.h" | |
#include <vector> | |
#include <cmath> | |
#include <string> | |
#include <cstdlib> |
This file contains 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
// AUTHOR: Stephen J. Barr | |
#include <trng/config.hpp> | |
#if defined TRNG_HAVE_OPENMP | |
#include <cstdlib> | |
#include <iostream> | |
#include <omp.h> | |
#include <trng/yarn2.hpp> | |
#include <trng/uniform01_dist.hpp> |
This file contains 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 <iostream> | |
#include <iomanip> | |
#include <fstream> | |
#include "mkl.h" | |
#include "math.h" | |
#include <vector> | |
#include <cmath> | |
#include <string> | |
This file contains 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
## Stephen J. Barr | |
## - this is some practice retrending the model | |
setwd("/home/stevejb/myhg/is-solver/indep_sim/") | |
retrendDemo <- function(THETA = 0.7880) { | |
## produce initial values | |
x = rnorm(30, sd=.03) |
This file contains 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
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8; -*- | |
// | |
// SJB - first shot at RInside and Eigen combined | |
// | |
// Copyright (C) 2012 Stephen J. Barr | |
// | |
// GPL'ed | |
#include <iostream> |
This file contains 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
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8; -*- | |
// | |
// SJB - first shot at RInside and Eigen combined | |
// | |
// Copyright (C) 2012 Stephen J. Barr | |
// | |
// GPL'ed | |
#include <iostream> |
This file contains 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
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8; -*- | |
// | |
// Simple example showing how expose a C++ function | |
// | |
// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois | |
#include <RInside.h> // for the embedded R via RInside | |
// a c++ function we wish to expose to R | |
const char* hello( std::string who ){ |
This file contains 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
## -*- mode: make; tab-width: 8; -*- | |
## | |
## Simple Makefile | |
## | |
## From RInside examples | |
## TODO: | |
## proper configure for non-Debian file locations, [ Done ] | |
## allow RHOME to be set for non-default R etc | |
## comment this out if you need a different version of R, |
This file contains 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
///////////////////// | |
// THE MPI SECTION // | |
///////////////////// | |
MPI::Init(); | |
// Next, use GSL to optimize over this | |
nll_mpi(start_vector, ua, ub, Xmat, Ymat, TASK_PARAM, false); | |
VectorXd test_vector = start_vector; | |
double INCREMENT = 0.1; | |
double my_result; |
This file contains 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
clear all; close all; clc | |
%% Exercise 3-1A | |
% find reasonable best-fit polynomial for data1 and data2 | |
data1 = load('data1.txt'); | |
data2 = load('data2.txt'); | |
data3 = load('data3.txt'); |
OlderNewer