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
function cat2d(X::Array{SparseMatrixCSC,2}) | |
iX = ones(Int, size(X)...) | |
mX, nX = size(X) | |
m = sum([size(X[i,1], 1) for i in 1:size(X, 1)]) | |
n = sum([size(X[1,i], 2) for i in 1:size(X, 2)]) | |
Tv = eltype(X[1].nzval) | |
Ti = eltype(X[1].rowval) |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define SIZE 1000000 | |
void main() | |
{ | |
int i=0; | |
srand(time(NULL)); | |
for(i=0;i<SIZE;i++) |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define SIZE 1000000 | |
int getMedian(); | |
int count=0; | |
void swap(); |