Skip to content

Commit

Permalink
first_output and second_output were swapped. Same with first_input an…
Browse files Browse the repository at this point in the history
…d second_input. Fixed.
  • Loading branch information
finegeometer committed Jul 22, 2019
1 parent 74cc2c4 commit 1a96d4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ impl<N: Scalar, X: Space, A: Space, B: Space> Linear<N, X, (A, B)> where
<(A, B) as Space>::Dim: na::DimSub<B::Dim, Output = A::Dim>,
{
pub fn first_output(self) -> Linear<N, X, A> {
Linear(self.0.remove_fixed_rows::<B::Dim>(0))
Linear(self.0.remove_fixed_rows::<B::Dim>(B::Dim::dim()))
}
pub fn second_output(self) -> Linear<N, X, B> {
Linear(self.0.remove_fixed_rows::<A::Dim>(B::Dim::dim()))
Linear(self.0.remove_fixed_rows::<A::Dim>(0))
}
pub fn combine_outputs(a: Linear<N, X, A>, b: Linear<N, X, B>) -> Self {
Linear(na::MatrixMN::<N, <(A, B) as Space>::Dim, X::Dim>::from_fn(|r, c| {
Expand All @@ -86,10 +86,10 @@ impl<N: Scalar, X: Space, A: Space, B: Space> Linear<N, (A, B), X> where
<(A, B) as Space>::Dim: na::DimSub<B::Dim, Output = A::Dim>,
{
pub fn first_input(self) -> Linear<N, A, X> {
Linear(self.0.remove_fixed_columns::<B::Dim>(0))
Linear(self.0.remove_fixed_columns::<B::Dim>(B::Dim::dim()))
}
pub fn second_input(self) -> Linear<N, B, X> {
Linear(self.0.remove_fixed_columns::<A::Dim>(B::Dim::dim()))
Linear(self.0.remove_fixed_columns::<A::Dim>(0))
}
pub fn combine_inputs(a: Linear<N, A, X>, b: Linear<N, B, X>) -> Self {
Linear(na::MatrixMN::<N, X::Dim, <(A, B) as Space>::Dim>::from_fn(|r, c| {
Expand Down

0 comments on commit 1a96d4d

Please sign in to comment.