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§
Sourcefn check_valid(&self, dim: usize) -> bool
fn check_valid(&self, dim: usize) -> bool
Validate that input row count is compatible with robot dimension dim.
Sourcefn as_matrix(&self) -> InputMatrix<'_>
fn as_matrix(&self) -> InputMatrix<'_>
Borrow input as a matrix view (dim x ncols).