use crate::traits::FloatExt;
mod black_karasinski;
mod common;
mod curve_fitted_hw;
mod g2pp;
mod hull_white;
pub use black_karasinski::BlackKarasinskiTree;
pub use black_karasinski::BlackKarasinskiTreeModel;
pub(crate) use common::correlated_joint_probabilities;
pub use curve_fitted_hw::CurveFittedHullWhiteModel;
pub use curve_fitted_hw::CurveFittedHullWhiteTree;
pub use g2pp::G2ppTree;
pub use g2pp::G2ppTreeModel;
pub use hull_white::HullWhiteTree;
pub use hull_white::HullWhiteTreeModel;
pub trait OneFactorShortRateModel<T: FloatExt>: Clone + Send + Sync {
fn initial_state(&self) -> T;
fn drift(&self, time: T, state: T) -> T;
fn diffusion(&self, time: T, state: T) -> T;
fn short_rate(&self, time: T, state: T) -> T;
}
pub trait TwoFactorShortRateModel<T: FloatExt>: Clone + Send + Sync {
fn initial_x(&self) -> T;
fn initial_y(&self) -> T;
fn drift_x(&self, time: T, x: T) -> T;
fn drift_y(&self, time: T, y: T) -> T;
fn diffusion_x(&self, time: T, x: T) -> T;
fn diffusion_y(&self, time: T, y: T) -> T;
fn correlation(&self) -> T;
fn short_rate(&self, time: T, x: T, y: T) -> T;
}