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
library("RcppArmadillo") | |
library("Rcpp") | |
library("hesim") | |
library("flexsurv") | |
sourceCpp("code/** | |
Requires the transition_costs branch | |
Mark Clements | |
2024-07-08 | |
*/ |
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
.PHONY: clean | |
rosetta2: clean rosetta2.prg | |
hbmk2 -run rosetta2.prg hbnf.hbc | |
clean: | |
rm -f rosetta2 | |
rm -f patient.dbf visit.dbf summ1.dbf summ2.dbf summ3.dbf |
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
#define MATHLIB_STANDALONE | |
#include <Rmath.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <stdint.h> | |
//copied from src/main/RNG.c: | |
typedef unsigned int Int32; | |
static Int32 dummy[625]; |
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
minimal_fails: minimal_fails.m | |
mmc --make -v -l:libRmath.a -L `pkg-config --variable=libdir libRmath` minimal_fails && ./minimal_fails | |
minimal_ok: minimal_ok.m | |
mmc --make -v -l:libRmath.a -L `pkg-config --variable=libdir libRmath` minimal_ok && ./minimal_ok | |
minimal_fixed: minimal_fixed.m | |
mmc --make -v -l:libRmath.a -L `pkg-config --variable=libdir libRmath` minimal_fixed && ./minimal_fixed |
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
:- module test_run. | |
:- interface. | |
:- import_module io. | |
:- pred main(io::di, io::uo) is det. | |
:- implementation. | |
:- import_module ranges, solutions, list, int, string. | |
main(!IO) :- |
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
infix 7 *! | |
infix 6 +! -! | |
structure SeqIndex = struct | |
open Int | |
val op +! = Int.+ | |
val op -! = Int.- | |
val op *! = Int.* | |
local | |
fun ltu (lhs, rhs) = | |
case (compare (lhs, 0), compare (rhs, 0)) of |
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
local | |
val call = _import "cblas_dgemm" public: int * int * int * int * int * int * real * real Vector.vector * int * real Vector.vector * int * real * real Array.array * int -> unit; | |
datatype cblasTranspose = NoTrans | Trans | ConjTrans | ConjNoTrans | |
fun cblasOrder Array2.RowMajor = 101 | |
| cblasOrder Array2.ColMajor = 102 | |
fun cblasTranspose NoTrans = 111 | |
| cblasTranspose Trans = 112 | |
| cblasTranspose ConjTrans = 113 | |
| cblasTranspose ConjNoTrans = 114 | |
fun getVector a = |
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
git clone git://git.savannah.gnu.org/cim.git | |
cd cim | |
autoreconf -i | |
./configure | |
make | |
make check | |
sudo make install | |
cat > helloWorld.sim <<EOF | |
begin |
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
--- smlnj-lib/HTML/html-elements-fn.sml.orig Mon Nov 5 18:02:27 2007 | |
+++ smlnj-lib/HTML/html-elements-fn.sml Mon Nov 5 18:02:44 2007 | |
@@ -144,7 +144,8 @@ | |
* 3) a string literal enclosed in '' | |
*) | |
fun scanAttrVal (ctx, attrName, ss) = let | |
- fun isNameChar (#"." | #"-") = true | |
+ fun isNameChar #"." = true | |
+ | isNameChar #"-" = true | |
| isNameChar c = (Char.isAlphaNum c) |
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
structure Word31 = Word; | |
structure Int32 = Int; | |
structure Unsafe = struct | |
structure CharVector = CharVector | |
structure Array = Array | |
structure Vector = Vector | |
structure Word8Array = | |
struct | |
open Word8Array | |
fun create length = array(length, 0w0) |