Skip to content

Instantly share code, notes, and snippets.

View coderodde's full-sized avatar

Rodion Efremov coderodde

View GitHub Profile
@coderodde
coderodde / main.cpp
Last active November 13, 2024 07:51
A C++ program for counting byte histograms in files.
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <ios>
#include <istream>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <string>
@coderodde
coderodde / com.github.coderodde.math.BigInteger.java
Last active October 31, 2024 07:49
A simple class for holding non-negative integers with arbitrary number of digits. Supports only summation operation.
package com.github.coderodde.math;
import java.util.Objects;
import java.util.Random;
import java.util.Scanner;
/**
* This class represents a non-negative integer with arbitrary number of digits.
* Instances of this class are immutable.
*
@coderodde
coderodde / indexed.linked.list.entropy.dat
Last active October 30, 2024 14:13
The output of the IndexedLinkedListEntropy program.
# Iteration: 1
0.019900 3168.985000
0.029800 2662.328200
0.039700 2448.982600
0.049600 3247.529200
0.059500 3473.904600
0.069400 3333.155200
0.079300 2165.653900
0.089200 2179.825000
0.099100 2116.665100
@coderodde
coderodde / PartialRunningTimeStatisticsProducer.dat
Last active October 30, 2024 14:09
FittingWorkRatios.java project output data files.
<<< PartialRunningTimeStatisticsProducer >>>
[Data set 1 ] curve: mean = 0,856112, std = 0,126600, dist = 0,161782; data set: mean = 0,858582, std = 0,233575.
[Data set 2 ] curve: mean = 0,840323, std = 0,108234, dist = 0,168597; data set: mean = 0,842195, std = 0,228046.
[Data set 3 ] curve: mean = 0,838600, std = 0,083718, dist = 0,173736; data set: mean = 0,839846, std = 0,226096.
[Data set 4 ] curve: mean = 0,832649, std = 0,074789, dist = 0,151485; data set: mean = 0,834139, std = 0,198362.
[Data set 5 ] curve: mean = 0,798199, std = 0,085541, dist = 0,138090; data set: mean = 0,799900, std = 0,192366.
[Data set 6 ] curve: mean = 0,836433, std = 0,103488, dist = 0,164244; data set: mean = 0,838495, std = 0,215957.
[Data set 7 ] curve: mean = 0,809561, std = 0,064404, dist = 0,151362; data set: mean = 0,810626, std = 0,187350.
[Data set 8 ] curve: mean = 0,834674, std = 0,095554, dist = 0,150443; data set: mean = 0,836188, std = 0,200333.
[Data set 9 ] curve: mean = 0,824165, std = 0,088805, dist
@coderodde
coderodde / VerboseRunningTimeStatisticsProducer.txt
Last active October 22, 2024 09:06
The output of VerbosePartialRunningTimeStatisticsProducer in FittingWorkRatios.
<<< PartialRunningTimeStatisticsProducer >>>
[Data set 1 ] curve: mean = 0,856112, std = 0,126600, dist = 0,161782; data set: mean = 0,858582, std = 0,233575.
[Data set 2 ] curve: mean = 0,840323, std = 0,108234, dist = 0,168597; data set: mean = 0,842195, std = 0,228046.
[Data set 3 ] curve: mean = 0,838600, std = 0,083718, dist = 0,173736; data set: mean = 0,839846, std = 0,226096.
[Data set 4 ] curve: mean = 0,832649, std = 0,074789, dist = 0,151485; data set: mean = 0,834139, std = 0,198362.
[Data set 5 ] curve: mean = 0,798199, std = 0,085541, dist = 0,138090; data set: mean = 0,799900, std = 0,192366.
[Data set 6 ] curve: mean = 0,836433, std = 0,103488, dist = 0,164244; data set: mean = 0,838495, std = 0,215957.
[Data set 7 ] curve: mean = 0,809561, std = 0,064404, dist = 0,151362; data set: mean = 0,810626, std = 0,187350.
[Data set 8 ] curve: mean = 0,834674, std = 0,095554, dist = 0,150443; data set: mean = 0,836188, std = 0,200333.
[Data set 9 ] curve: mean = 0,824165, std = 0,088805, dist
@coderodde
coderodde / EntropyToAmortizedWork100.dat
Last active October 24, 2024 09:04
Entropy to amortized work data with 100 data sets.
# Iteration: 1
0.019900 3168.985000
0.029800 2662.328200
0.039700 2448.982600
0.049600 3247.529200
0.059500 3473.904600
0.069400 3333.155200
0.079300 2165.653900
0.089200 2179.825000
0.099100 2116.665100
@coderodde
coderodde / ComputeFingerListConfigurationsWithEntropies.java
Created October 8, 2024 09:36
The research program for fetching the finger configurations producing minimum and maximum configurations.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class ComputeFingerListConfigurationsWithEntropies {
public static void main(String[] args) {
FingerList fingerList = new FingerList();
int lineNumber = 1;
@coderodde
coderodde / main.cppp
Last active September 9, 2024 14:09
PPC sorting algorithm research attempt.
#include <algorithm>
#include <chrono>
#include <cstring>
#include <iostream>
#include <limits.h>
#include <math.h>
#include <random>
#include <time.h>
#include <limits>
#include <string.h>
@coderodde
coderodde / IncreasingEntropyOfFingerList.java
Last active September 5, 2024 05:58
IncreasingEntropyOfFingerList.java
package fi.helsinki.coderodde.util;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
public class IncreasingEntropyOfFingerList {
public static void main(String[] args) {
@coderodde
coderodde / so.cc
Last active September 3, 2024 06:01
A sorting task for quicksort in PPC course.
#include <iostream>
#include <algorithm>
#include <chrono>
#include <omp.h>
#include <pthread.h>
#define N 50000000
using std::swap;
using std::cout;