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
NC = \033[0m | |
RED = \033[0;31m | |
ORANGE = \033[0;33m | |
GREEN = \033[0;32m | |
PURPLE = \033[0;35m | |
FILE_EXT = cc | |
CC = g++ | |
EXEC = create | |
OUTPUT = output |
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 Main where | |
import Control.Applicative ( liftA2 ) | |
import Control.Arrow | |
import Control.Monad ( replicateM ) | |
import Data.List ( maximumBy | |
, minimumBy | |
, nubBy | |
, unfoldr | |
) |
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
![feature(const_fn_floating_point_arithmetic)] | |
fn rand() -> f64 { | |
const RAND_SEED: u64 = 69; | |
// https://en.wikipedia.org/wiki/Permuted_congruential_generator | |
thread_local! { | |
static INIT: std::cell::Cell<u64> = std::cell::Cell::new(RAND_SEED); | |
} | |
INIT.with(|cell| { | |
let s = cell.get(); |
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
package main; | |
import( | |
"fmt" | |
) | |
type LinearFunction struct { | |
a float64 | |
b float64 | |
} |
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> | |
#define N 10 | |
typedef struct { | |
// Linear Function with form f(x)=a*x+b | |
float a; | |
float b; | |
} LinearFunction; |
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
# Léo Duret - May 2019 | |
# For AGFLOW | |
class RuleSet(object): | |
""" | |
Holds Dependencies and Conflict rules adding the abilitty | |
to check coherence of them. | |
""" |