Skip to content

Commit 2bcfc1f

Browse files
committed
use fluky library for random numbers
1 parent 77a9bee commit 2bcfc1f

19 files changed

+124
-407
lines changed

CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ find_package(cpp-sort REQUIRED)
8989
find_package(Eigen3 REQUIRED)
9090
find_package(eve REQUIRED)
9191
find_package(FastFloat REQUIRED)
92+
find_package(fluky REQUIRED)
9293
find_package(fmt REQUIRED)
9394
find_package(lbfgs REQUIRED)
9495
find_package(libassert REQUIRED)
@@ -241,12 +242,13 @@ target_link_libraries(operon_operon INTERFACE
241242
target_link_libraries(operon_operon PUBLIC
242243
Eigen3::Eigen
243244
Threads::Threads
245+
fluky::fluky
244246
fmt::fmt
245-
std::mdspan
246-
pratt-parser::pratt-parser # required by infix parser
247-
vstat::vstat
248247
lbfgs::lbfgs
249248
libassert::assert
249+
pratt-parser::pratt-parser # required by infix parser
250+
std::mdspan
251+
vstat::vstat
250252
)
251253

252254
target_link_libraries(operon_operon PRIVATE

flake.lock

+97-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
flake-parts.url = "github:hercules-ci/flake-parts";
66
nixpkgs.url = "github:nixos/nixpkgs/master";
77
foolnotion.url = "github:foolnotion/nur-pkg";
8+
fluky.url = "github:foolnotion/fluky";
89
lbfgs.url = "github:foolnotion/lbfgs";
910
pratt-parser.url = "github:foolnotion/pratt-parser-calculator";
1011
vstat.url = "github:heal-research/vstat";
@@ -16,9 +17,10 @@
1617
pratt-parser.inputs.nixpkgs.follows = "nixpkgs";
1718
vstat.inputs.nixpkgs.follows = "nixpkgs";
1819
vdt.inputs.nixpkgs.follows = "nixpkgs";
20+
fluky.inputs.nixpkgs.follows = "nixpkgs";
1921
};
2022

21-
outputs = inputs@{ self, flake-parts, nixpkgs, foolnotion, pratt-parser, vdt, vstat, lbfgs }:
23+
outputs = inputs@{ self, flake-parts, nixpkgs, foolnotion, fluky, pratt-parser, vdt, vstat, lbfgs }:
2224
flake-parts.lib.mkFlake { inherit inputs; } {
2325
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
2426

@@ -29,10 +31,11 @@
2931
overlays = [
3032
foolnotion.overlay
3133
(final: prev: {
32-
vdt = vdt.packages.${system}.default;
33-
vstat = vstat.packages.${system}.default;
34+
fluky = fluky.packages.${system}.default;
3435
lbfgs = lbfgs.packages.${system}.default;
3536
pratt-parser = pratt-parser.packages.${system}.default;
37+
vdt = vdt.packages.${system}.default;
38+
vstat = vstat.packages.${system}.default;
3639
})
3740
];
3841
};

include/operon/core/tree.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <algorithm>
88
#include <cstdint>
99
#include <vector>
10+
#include <numeric>
1011

1112
#include "contracts.hpp"
1213
#include "subtree.hpp"

include/operon/core/types.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
#include <ankerl/unordered_dense.h>
88
#include <cstdint>
9+
#include <fluky/fluky.hpp>
910
#include <span>
1011
#include <utility>
1112

1213
#include "constants.hpp"
13-
#include "operon/random/random.hpp"
1414

1515
namespace Operon {
1616
using Hash = uint64_t;
1717
constexpr HashFunction HashFunc = HashFunction::XXHash;
1818

19-
using RandomGenerator = Random::RomuTrio;
19+
using RandomGenerator = fluky::xoshiro256ss;
2020

2121
template <typename T>
2222
using Vector = std::vector<T>;

include/operon/operators/initializer.hpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
#ifndef OPERON_INITIALIZER_HPP
55
#define OPERON_INITIALIZER_HPP
66

7+
#include <random>
8+
#include <gsl/pointers>
9+
710
#include "operon/core/tree.hpp"
811
#include "operon/operators/creator.hpp"
9-
#include <gsl/pointers>
1012

1113
namespace Operon {
1214

0 commit comments

Comments
 (0)