Skip to main content

HessianBlock

Trait HessianBlock 

Source
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§

Source

fn entry(&self, row: usize, column: usize) -> TensorRank0

The entry of the block at the given row and column within it.

Source

fn height(&self) -> usize

The number of rows the block occupies.

Source

fn width(&self) -> usize

The number of columns the block occupies.

Source

fn fill_into_block<M>(&self, matrix: &mut M, row: usize, column: usize)
where M: IndexMut<usize, Output = Vector>,

Fills the block into a matrix at the given row and column offsets.

Provided Methods§

Source

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.

Source

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§

Source§

impl HessianBlock for CscMatrix

Source§

impl HessianBlock for Matrix

Source§

impl HessianBlock for TensorRank0

Source§

impl<H: HessianBlock> HessianBlock for Transposed<H>

Source§

impl<U> HessianBlock for Quantity<U>

A quantity is a 1x1 block.

Source§

impl<const D: usize, I, J, K, L, U> HessianBlock for TensorRank4<D, I, J, K, L, U>

Source§

impl<const D: usize, I, U> HessianBlock for TensorRank1<D, I, U>