Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <cmath>
#include <random>
using namespace std;
class normal_generator {
bool status;
double cache;
public:
normal_generator() {
#include <iostream>
#include <random>
using namespace std;
double random_number() {
return double (rand()) / RAND_MAX;
}
int partition(double A[], int s, int t) {
double pivot = A[s];
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.
#include <iostream>
using namespace std;
struct rechteck {
double x, y;
};
rechteck rotation(rechteck r) {
rechteck rot = {r.y, r.x};
return rot;
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstdlib>
#include <vector>
using namespace std;
vector<double> x, y;
int get_file(string filename) {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.