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
| public static double NMI(ArrayList<Integer> one, ArrayList<Integer> two){ | |
| if(one.size()!=two.size()){ | |
| throw new IllegalArgumentException("Sizes don't match!"); | |
| } | |
| int maxone = Collections.max(one); | |
| int maxtwo = Collections.max(two); | |
| double[][] count = new double[maxone+1][maxtwo+1]; | |
| //System.out.println(count[1][2]); | |
| for(int i=0;i<one.size();i++){ |
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
| data <- rbind(cbind(rnorm(100,mean=0, sd=5), rnorm(100,mean=0, sd=0.5)),cbind(rnorm(100,mean=5, sd=2), rnorm(100,mean=12, sd=5))) | |
| write.csv2(data, "data.csv", row.names=FALSE) | |
| mydata = read.csv2("data.csv") |
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 <iostream> | |
| #include <x86intrin.h> | |
| #include <immintrin.h> | |
| #include <stdlib.h> | |
| #include "cholesky.h" | |
| #include <boost/timer/timer.hpp> | |
| using namespace std; | |
| // typedef __m256d T_dvec; |
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 <sys/time.h> | |
| #define N 100 | |
| #define MAX_ITER 5000 | |
| typedef float MATRIX_V[N+1][N+1]; | |
| int timeval_subtract(struct timeval *result, struct timeval *t2, struct timeval *t1); |
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
| /***************************************************** | |
| * Exercise 4 | |
| * File: jacobi.c | |
| * | |
| * description: | |
| * | |
| * Jacobi iteration on a NxN matrix with MAX_ITER iterations | |
| * | |
| * Language: 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
| /* | |
| Perdacher Martin | |
| jacobi iteration, with row-wise decomposition | |
| * to distribute the matrix, MPI_Scatterv is used (row-wise decomposition) | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> |
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
| /* | |
| Perdacher Martin | |
| Multiply of n*n-matrix with an n-vector | |
| * to distribute the vector, MPI_Scatterv is used (each process has rows of the vector) | |
| * to distribute the matrix, MPI_Scatterv is used (colum-wise decomposition) | |
| * to collect the results MPI_Reduce_Scatter is used | |
| */ |
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
| /* | |
| Perdacher Martin | |
| Multiply of n*n-matrix with an n-vector | |
| * to distribute the vector, MPI_Allgether is used | |
| * to distribute the matrix, MPI_Scatterv is used (row-wise decomposition) | |
| */ | |
| #include <stdio.h> |
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 <stdlib.h> | |
| #include <math.h> | |
| #include "mpi.h" | |
| #define MASTER 0 | |
| #define REPETITIONS 10 | |
| double Function(double x); |
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 <stdlib.h> | |
| #include "mpi.h" | |
| #define MASTER 0 | |
| #define REPETITIONS 10 | |
| #define T_mpisendtype MPI_CHAR | |
| typedef unsigned char T_arraytype; |
NewerOlder