Skip to main content

UpperBound

Trait UpperBound 

Source
pub trait UpperBound {
    // Required methods
    fn check_valid(&self, dim: usize) -> bool;
    fn ncols(&self) -> usize;
    fn as_matrix(&self) -> InputMatrix<'_>;
}
Expand description

Borrowable upper-bound input accepted by robot constraint APIs.

This trait abstracts two common user inputs:

  • broadcast vectors (&[f64], ncols);
  • explicit matrix views &InputMatrix.

Implementations must expose a matrix view of shape (dim, ncols).

Required Methods§

Source

fn check_valid(&self, dim: usize) -> bool

Validate that input row count is compatible with robot dimension dim.

Source

fn ncols(&self) -> usize

Number of station columns represented by this bound input.

Source

fn as_matrix(&self) -> InputMatrix<'_>

Borrow input as a matrix view (dim x ncols).

Implementations on Foreign Types§

Source§

impl UpperBound for (&[f64], usize)

Source§

fn check_valid(&self, dim: usize) -> bool

Source§

fn ncols(&self) -> usize

Source§

fn as_matrix(&self) -> InputMatrix<'_>

Implementors§