pub trait HessianBlock {
// Required methods
fn entry(&self, row: usize, column: usize) -> TensorRank0;
fn height(&self) -> usize;
fn width(&self) -> usize;
fn fill_into_block<M>(&self, matrix: &mut M, row: usize, column: usize)
where M: IndexMut<usize, Output = Vector>;
// Provided methods
fn block_size(&self) -> Option<usize> { ... }
fn for_each_entry(
&self,
_function: &mut dyn FnMut(usize, usize, TensorRank0),
) -> bool { ... }
}Expand description
Common methods for blocks of a Hessian.
Required Methods§
Sourcefn entry(&self, row: usize, column: usize) -> TensorRank0
fn entry(&self, row: usize, column: usize) -> TensorRank0
The entry of the block at the given row and column within it.
Provided Methods§
Sourcefn block_size(&self) -> Option<usize>
fn block_size(&self) -> Option<usize>
The size of the independent square blocks along the diagonal that the block consists of, if that is what it is.
Sourcefn for_each_entry(
&self,
_function: &mut dyn FnMut(usize, usize, TensorRank0),
) -> bool
fn for_each_entry( &self, _function: &mut dyn FnMut(usize, usize, TensorRank0), ) -> bool
Calls the function with every entry the block holds explicitly, and says whether the block has any such notion.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl HessianBlock for CscMatrix
impl HessianBlock for Matrix
impl HessianBlock for TensorRank0
impl<H: HessianBlock> HessianBlock for Transposed<H>
impl<U> HessianBlock for Quantity<U>
A quantity is a 1x1 block.