global: fixes

This commit is contained in:
nym21
2026-01-21 00:26:35 +01:00
parent 2edd9ed2d7
commit 6c67dc4a98
10 changed files with 3464 additions and 1242 deletions

View File

@@ -16,11 +16,12 @@ use vecdb::{
};
use crate::{
ComputeIndexes, indexes,
indexes,
internal::{
CumulativeVec, Full, LazyBinaryTransformFull, LazyDateDerivedFull, LazyFull,
SatsTimesClosePrice, Stats, compute_cumulative,
SatsTimesClosePrice, Stats,
},
ComputeIndexes,
};
/// Lazy dollars at TxIndex: `sats * price[height]`
@@ -136,10 +137,9 @@ impl ValueDollarsFromTxFull {
exit: &Exit,
) -> Result<()> {
// Compute height cumulative by summing lazy height.sum values
compute_cumulative(
self.height_cumulative.0.compute_cumulative(
starting_indexes.height,
&self.height.sum,
&mut self.height_cumulative.0,
exit,
)?;

View File

@@ -9,11 +9,11 @@ use schemars::JsonSchema;
use vecdb::{Database, Exit, IterableBoxedVec, IterableCloneableVec, IterableVec};
use crate::{
ComputeIndexes, indexes,
indexes,
internal::{
ComputedVecValue, CumulativeVec, Full, LazyDateDerivedFull, LazyFull, NumericValue,
compute_cumulative,
},
ComputeIndexes,
};
#[derive(Clone, Deref, DerefMut, Traversable)]
@@ -102,6 +102,9 @@ where
height_source: &impl IterableVec<Height, T>,
exit: &Exit,
) -> Result<()> {
compute_cumulative(max_from, height_source, &mut self.height_cumulative.0, exit)
self.height_cumulative
.0
.compute_cumulative(max_from, height_source, exit)?;
Ok(())
}
}

View File

@@ -12,11 +12,11 @@ use vecdb::{
};
use crate::{
ComputeIndexes, indexes,
indexes,
internal::{
ComputedVecValue, CumulativeVec, LazyDateDerivedSumCum, LazySumCum, NumericValue, SumCum,
compute_cumulative,
},
ComputeIndexes,
};
#[derive(Clone, Deref, DerefMut, Traversable)]
@@ -99,7 +99,10 @@ where
source: &impl IterableVec<Height, T>,
exit: &Exit,
) -> Result<()> {
compute_cumulative(max_from, source, &mut self.height_cumulative.0, exit)
self.height_cumulative
.0
.compute_cumulative(max_from, source, exit)?;
Ok(())
}
fn compute_dateindex_sum_cum(