use crate::linalg::allocator::Allocator;
use crate::linalg::{DefaultAllocator, DimName};
use crate::md::trajectory::Interpolatable;
pub use crate::od::estimate::*;
pub use crate::od::*;
use msr::sensitivity::TrackerSensitivity;
use std::fmt;
use std::ops::Add;
use super::ODSolution;
impl<StateType, EstType, MsrSize, Trk> fmt::Display for ODSolution<StateType, EstType, MsrSize, Trk>
where
StateType: Interpolatable + Add<OVector<f64, <StateType as State>::Size>, Output = StateType>,
EstType: Estimate<StateType>,
MsrSize: DimName,
Trk: TrackerSensitivity<StateType, StateType>,
<DefaultAllocator as Allocator<<StateType as State>::VecLength>>::Buffer<f64>: Send,
DefaultAllocator: Allocator<<StateType as State>::Size>
+ Allocator<<StateType as State>::VecLength>
+ Allocator<MsrSize>
+ Allocator<MsrSize, <StateType as State>::Size>
+ Allocator<MsrSize, MsrSize>
+ Allocator<<StateType as State>::Size, <StateType as State>::Size>
+ Allocator<<StateType as State>::Size, MsrSize>,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if self.results().count() == 0 {
writeln!(f, "Empty OD solution")
} else {
let kind = if self.is_filter_run() {
"Filter"
} else {
"Smoother"
};
writeln!(
f,
"{kind} OD solution from {:?}, spanning {}-{}, with {} estimates, including {} accepted residuals",
self.unique(),
self.estimates.first().unwrap().epoch(),
self.estimates.last().unwrap().epoch(),
self.estimates.len(),
self.accepted_residuals().len()
)
}
}
}