Add `ShapeConstraint` for `Extend<Vector<_,_,_>>` implementations.

This commit is contained in:
Jack Wrenn 2018-11-17 12:13:03 -05:00 committed by Sébastien Crozet
parent 0ed67d0470
commit c36416b9c0
2 changed files with 5 additions and 2 deletions

View File

@ -779,7 +779,8 @@ where
R: Dim, R: Dim,
S: Extend<Vector<N, RV, SV>>, S: Extend<Vector<N, RV, SV>>,
RV: Dim, RV: Dim,
SV: Storage<N, RV> SV: Storage<N, RV>,
ShapeConstraint: SameNumberOfRows<R, RV>,
{ {
/// Extends the number of columns of a `Matrix` with `Vector`s /// Extends the number of columns of a `Matrix` with `Vector`s
/// from a given iterator. /// from a given iterator.

View File

@ -10,6 +10,7 @@ use base::default_allocator::DefaultAllocator;
use base::dimension::{Dim, DimName, Dynamic, U1}; use base::dimension::{Dim, DimName, Dynamic, U1};
use base::storage::{ContiguousStorage, ContiguousStorageMut, Owned, Storage, StorageMut}; use base::storage::{ContiguousStorage, ContiguousStorageMut, Owned, Storage, StorageMut};
use base::{Scalar, Vector}; use base::{Scalar, Vector};
use base::constraint::{SameNumberOfRows, ShapeConstraint};
#[cfg(feature = "abomonation-serialize")] #[cfg(feature = "abomonation-serialize")]
use abomonation::Abomonation; use abomonation::Abomonation;
@ -264,7 +265,8 @@ where
N: Scalar, N: Scalar,
R: Dim, R: Dim,
RV: Dim, RV: Dim,
SV: Storage<N, RV> SV: Storage<N, RV>,
ShapeConstraint: SameNumberOfRows<R, RV>,
{ {
/// Extends the number of columns of the `MatrixVec` with vectors /// Extends the number of columns of the `MatrixVec` with vectors
/// from the given iterator. /// from the given iterator.