Skip to content

Instantly share code, notes, and snippets.

View spceaza's full-sized avatar

Cristian Sandoval-Pineda spceaza

  • Bogota, Colombia
View GitHub Profile
@spceaza
spceaza / Matrix.cpp
Created September 4, 2015 19:59
Benchmark SICS Matrix class
#include <type/Matrix.h>
#include <iostream>
#include <ctime>
#include <chrono>
using namespace std;
Matrix<double>* matrix_obj;
double ** matrix_ptr;
CFLAGS = -std=c++11 -Wunused-function -O3
all:
rm test
g++ -Wall $(CFLAGS) -I../../src/ Matrix_B.cpp -o test
@spceaza
spceaza / Matrix.h
Last active September 7, 2015 23:48
/*
* Matrix.h
*
* Created on: May 28, 2014
* Author: mirt
*/
#ifndef MATRIX_H_
#define MATRIX_H_
#include <iostream>
@spceaza
spceaza / Test.R
Last active November 27, 2015 15:04
library(IRTpp)
t = simulateTest(model="3PL", individuals=20000, items=200)
t = t$test[[1]]
tm1 = proc.time()[3]
a = irtpp(dataset=t, model="3PL")
tm1 = proc.time()[3] - tm1
tm1
#include <iostream>
#include <random>
#include <cmath>
void print_output(int impulse[2], double** weight, double ** threshold);
double evaluate(int impulse[2], double** weight, double ** threshold)
{
double output1 = impulse[0]*weight[0][0] + impulse[1]*weight[0][2];
output1 = output1 >= threshold[0][0] ? output1 : 0;
public class Permutaciones {
public static void permutacion(int array1[], int array2[]) {
int size1 = array1 == null ? 0 : array1.length;
int size2 = array2.length;
if (size2 == 2) {
/**
* *********************** Caso Base ***********************
*/
#include <iostream>
#include <random>
#include <cmath>
using namespace std;
int main()
{
std::random_device rd;
std::mt19937 e2(rd());
#include <iostream>
#include <random>
#include <cmath>
using namespace std;
int main()
{
std::random_device rd;
std::mt19937 e2(rd());
@spceaza
spceaza / parcial.cpp
Last active September 28, 2015 17:27
#include <iostream>
#include <random>
#include <fstream>
#define N_ atoi(argv[1])
#define DELTA strtod(argv[2], NULL)
enum{OPEN, CLOSED};
using namespace std;
/* config.h.in. Generated from configure.ac by autoheader. */
/***** begin user configuration section *****/
/* Define this to be the location of your password file */
#define PASSWD_FILE "/etc/passwd"
/* Define this to be the name of your NIS/YP password *
* map (if applicable) */
#define PASSWD_MAP "passwd.byname"