mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-04 19:29:09 -07:00
computer: internal reorg
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
mod full;
|
||||
mod last;
|
||||
mod lazy_last;
|
||||
mod lazy_amount;
|
||||
mod map_option;
|
||||
mod transform_last;
|
||||
|
||||
pub use full::*;
|
||||
pub use last::*;
|
||||
pub use lazy_last::*;
|
||||
pub use lazy_amount::*;
|
||||
pub use map_option::*;
|
||||
pub use transform_last::*;
|
||||
@@ -2,9 +2,11 @@ mod cumulative;
|
||||
mod cumulative_sum;
|
||||
mod full;
|
||||
mod lazy;
|
||||
mod lazy_derived;
|
||||
mod rolling;
|
||||
mod rolling_full;
|
||||
mod rolling_sum;
|
||||
mod windows;
|
||||
|
||||
use brk_error::Result;
|
||||
use brk_traversable::Traversable;
|
||||
@@ -27,6 +29,8 @@ pub use lazy::*;
|
||||
pub use rolling::*;
|
||||
pub use rolling_full::*;
|
||||
pub use rolling_sum::*;
|
||||
pub use lazy_derived::*;
|
||||
pub use windows::*;
|
||||
|
||||
#[derive(Traversable)]
|
||||
pub struct AmountFromHeight<M: StorageMode = Rw> {
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
mod aggregated;
|
||||
mod base;
|
||||
mod constant;
|
||||
mod cumulative;
|
||||
mod cumulative_sum;
|
||||
mod delta;
|
||||
mod derived;
|
||||
mod derived_full;
|
||||
mod fiat_delta;
|
||||
mod full;
|
||||
mod rolling_average;
|
||||
mod sum;
|
||||
|
||||
pub use aggregated::*;
|
||||
pub use base::*;
|
||||
pub use constant::*;
|
||||
pub use cumulative::*;
|
||||
pub use cumulative_sum::*;
|
||||
pub use delta::*;
|
||||
pub use derived::*;
|
||||
pub use derived_full::*;
|
||||
pub use fiat_delta::*;
|
||||
pub use full::*;
|
||||
pub use rolling_average::*;
|
||||
|
||||
@@ -4,10 +4,12 @@ use brk_types::{Cents, CentsSigned, Dollars, Version};
|
||||
use schemars::JsonSchema;
|
||||
use vecdb::{Database, ReadableCloneableVec, Rw, StorageMode, UnaryTransform};
|
||||
|
||||
use super::{ComputedFromHeight, LazyFromHeight};
|
||||
use crate::{
|
||||
indexes,
|
||||
internal::{CentsSignedToDollars, CentsUnsignedToDollars, NumericValue},
|
||||
internal::{
|
||||
CentsSignedToDollars, CentsUnsignedToDollars, ComputedFromHeight, LazyFromHeight,
|
||||
NumericValue,
|
||||
},
|
||||
};
|
||||
|
||||
/// Trait that associates a cents type with its transform to Dollars.
|
||||
@@ -2,10 +2,7 @@ use brk_traversable::Traversable;
|
||||
use brk_types::{Dollars, Version};
|
||||
use vecdb::ReadableCloneableVec;
|
||||
|
||||
use super::{ComputedFromHeight, LazyFromHeight};
|
||||
use crate::internal::{Identity, NumericValue};
|
||||
|
||||
use super::fiat::CentsType;
|
||||
use crate::internal::{CentsType, ComputedFromHeight, Identity, LazyFromHeight, NumericValue};
|
||||
|
||||
/// Lazy fiat: both cents and usd are lazy views of a stored source.
|
||||
/// Zero extra stored vecs.
|
||||
5
crates/brk_computer/src/internal/from_height/fiat/mod.rs
Normal file
5
crates/brk_computer/src/internal/from_height/fiat/mod.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
mod base;
|
||||
mod lazy;
|
||||
|
||||
pub use base::*;
|
||||
pub use lazy::*;
|
||||
9
crates/brk_computer/src/internal/from_height/lazy/mod.rs
Normal file
9
crates/brk_computer/src/internal/from_height/lazy/mod.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
mod base;
|
||||
mod derived;
|
||||
mod map_option;
|
||||
mod transform_last;
|
||||
|
||||
pub use base::*;
|
||||
pub use derived::*;
|
||||
pub use map_option::*;
|
||||
pub use transform_last::*;
|
||||
@@ -1,25 +1,21 @@
|
||||
mod base;
|
||||
mod amount;
|
||||
mod computed;
|
||||
mod constant;
|
||||
mod fiat;
|
||||
mod lazy;
|
||||
mod lazy_fiat;
|
||||
mod percent;
|
||||
mod percentiles;
|
||||
mod price;
|
||||
mod ratio;
|
||||
mod rolling;
|
||||
mod stddev;
|
||||
|
||||
pub use base::*;
|
||||
pub use amount::*;
|
||||
pub use computed::*;
|
||||
pub use constant::*;
|
||||
pub use fiat::*;
|
||||
pub use lazy::*;
|
||||
pub use lazy_fiat::*;
|
||||
pub use percent::*;
|
||||
pub use percentiles::*;
|
||||
pub use price::*;
|
||||
pub use ratio::*;
|
||||
pub use rolling::*;
|
||||
pub use stddev::*;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
mod base;
|
||||
mod rolling_average;
|
||||
mod windows;
|
||||
|
||||
pub use base::*;
|
||||
pub use rolling_average::*;
|
||||
pub use windows::*;
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
mod distribution;
|
||||
mod full;
|
||||
mod percent_windows;
|
||||
mod amount_windows;
|
||||
mod windows;
|
||||
|
||||
pub use distribution::*;
|
||||
pub use full::*;
|
||||
pub use percent_windows::*;
|
||||
pub use amount_windows::*;
|
||||
pub use windows::*;
|
||||
@@ -1,25 +1,21 @@
|
||||
mod aggregate;
|
||||
mod algo;
|
||||
mod amount;
|
||||
mod containers;
|
||||
mod db_utils;
|
||||
mod derived;
|
||||
mod from_height;
|
||||
mod from_tx;
|
||||
mod indexes;
|
||||
mod rolling;
|
||||
mod traits;
|
||||
mod transform;
|
||||
mod amount;
|
||||
|
||||
pub(crate) use aggregate::*;
|
||||
pub(crate) use algo::*;
|
||||
pub(crate) use amount::*;
|
||||
pub(crate) use containers::*;
|
||||
pub(crate) use db_utils::*;
|
||||
pub(crate) use derived::*;
|
||||
pub(crate) use from_height::*;
|
||||
pub(crate) use from_tx::*;
|
||||
pub(crate) use indexes::*;
|
||||
pub(crate) use rolling::*;
|
||||
pub(crate) use traits::*;
|
||||
pub use transform::*;
|
||||
pub(crate) use amount::*;
|
||||
|
||||
Reference in New Issue
Block a user