Skip to content

Commit

Permalink
Merge pull request #27 from LAPKB/NPOD
Browse files Browse the repository at this point in the history
Npod
  • Loading branch information
Siel committed Nov 27, 2023
2 parents db56cb2 + c99da16 commit 62cb306
Show file tree
Hide file tree
Showing 9 changed files with 493 additions and 29 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ crossterm = "0.27.0"
tokio = { version = "1.32.0", features = ["sync", "rt"] }
ndarray-csv = "0.5.2"
rawpointer = "0.2.1"
argmin = "0.8.1"
argmin = { version = "0.8.1", features = [] }
itertools = "0.11.0"
faer-core = { version = "0.14.0", features = [] }
# faer-lu = "0.9"
faer-qr = "0.14.0"
# faer-cholesky = "0.9"
# faer-svd = "0.9"
argmin-math = { version = "0.3.0", features = ["ndarray_v0_15-nolinalg-serde"] }
dyn-stack = "0.10.0"
faer = { version = "0.14.0", features = ["nalgebra", "ndarray"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "fmt", "time"] }
chrono = "0.4"


[profile.release]
codegen-units = 1
opt-level = 3
2 changes: 1 addition & 1 deletion examples/two_eq_lag/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ log_out = "log/two_eq_lag.log"

[config]
cycles = 1000
engine = "NPAG"
engine = "NPOD"
init_points = 1000
seed = 22
tui = true
Expand Down
19 changes: 15 additions & 4 deletions src/algorithms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ use simulation::predict::{Engine, Predict};
use tokio::sync::mpsc;

mod npag;
mod npod;
mod postprob;

pub enum Type {
NPAG,
POSTPROB,
}
// pub enum Type {
// NPAG,
// NPOD,
// POSTPROB,
// }

pub trait Algorithm {
fn fit(&mut self) -> NPResult;
Expand Down Expand Up @@ -47,6 +49,15 @@ where
tx,
settings,
)),
"NPOD" => Box::new(npod::NPOD::new(
engine,
ranges,
theta,
scenarios,
settings.parsed.error.poly,
tx,
settings,
)),
"POSTPROB" => Box::new(postprob::POSTPROB::new(
engine,
theta,
Expand Down
1 change: 1 addition & 0 deletions src/algorithms/npag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::{
simulation::predict::{sim_obs, Predict},
},
tui::ui::Comm,

};

use ndarray::{Array, Array1, Array2, Axis};
Expand Down

0 comments on commit 62cb306

Please sign in to comment.