pub struct SupportJacobian {
pub starts: Vec<usize>,
pub offsets: Vec<usize>,
pub values: Vec<f64>,
pub parameter_count: usize,
}Expand description
Per-peak Jacobian stored only over each peak’s active support.
Fields§
§starts: Vec<usize>First active grid index for each peak.
offsets: Vec<usize>Prefix sum of active sample counts, with length peak_count + 1.
values: Vec<f64>Sample-major derivative rows with parameter_count values per sample.
parameter_count: usizeNumber of local derivative columns per active sample.
Implementations§
Source§impl SupportJacobian
impl SupportJacobian
Sourcepub fn peak_count(&self) -> usize
pub fn peak_count(&self) -> usize
Number of represented peaks.
Sourcepub fn active_sample_count(&self) -> usize
pub fn active_sample_count(&self) -> usize
Total number of active peak/sample pairs.
Sourcepub fn to_dense(&self, sample_count: usize) -> Result<Vec<f64>, ProfileError>
pub fn to_dense(&self, sample_count: usize) -> Result<Vec<f64>, ProfileError>
Materialize a parameter-major dense (peak, parameter, sample) Jacobian.
§Errors
Returns ProfileError if the dense allocation size overflows or the
supplied sample count is inconsistent with a stored support block.
Trait Implementations§
Source§impl Clone for SupportJacobian
impl Clone for SupportJacobian
Source§fn clone(&self) -> SupportJacobian
fn clone(&self) -> SupportJacobian
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SupportJacobian
impl Debug for SupportJacobian
Source§impl PartialEq for SupportJacobian
impl PartialEq for SupportJacobian
impl StructuralPartialEq for SupportJacobian
Auto Trait Implementations§
impl Freeze for SupportJacobian
impl RefUnwindSafe for SupportJacobian
impl Send for SupportJacobian
impl Sync for SupportJacobian
impl Unpin for SupportJacobian
impl UnsafeUnpin for SupportJacobian
impl UnwindSafe for SupportJacobian
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more