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
// | |
// Created by Yohsuke Murase on 2020/02/10. | |
// | |
#define _USE_MATH_DEFINES | |
#include <iostream> | |
#include <array> | |
#include <cmath> | |
#include <cassert> | |
#include <random> |
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 <fstream> | |
#include <nlohmann/json.hpp> | |
// for convenience | |
using json = nlohmann::json; | |
namespace ns { | |
// a simple struct to model a person | |
struct person { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <random> | |
#include <array> | |
// Cooperate : 1, Defect : 0 | |
// Good : 1, Bad : 0 | |
class AssessmentRule { | |
public: | |
AssessmentRule(size_t _id = 0) : id(_id) { assert(id >= 0 && id < 256); }; |
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
#!/bin/bash -eux | |
mpicc pdgesv_example.cpp -lscalapack | |
mpirun -np 6 ./a.out 9 2 2 3 |
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 <utility> | |
#include <vector> | |
#include <set> | |
#include <cassert> | |
class DFA { | |
public: | |
DFA(int n, int z, std::set<int> f, std::vector<std::vector<int>> _delta) : | |
N(n), Z(z), F(std::move(f)), delta(std::move(_delta)) { |
OlderNewer